Topic: styleswitcher.js and iframes... Pages that link to <a href="https://ozoneasylum.com/backlink?for=27055" title="Pages that link to Topic: styleswitcher.js and iframes..." rel="nofollow" >Topic: styleswitcher.js and iframes...\

 
Author Thread
Borisz
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Nov 2005

IP logged posted posted 11-27-2005 22:49 Edit Quote

I'm building a site that can switch styles using the javascript from this place:
http://www.alistapart.com/stories/alternate/

However, my site uses iframes. How would it be possible to make a link that switches the style of not just the main page, but the content loaded into the iframe as well?

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

IP logged posted posted 11-28-2005 14:07 Edit Quote

You will need to modify the code to force this switch in all of your other frames.

From the frame you have your switching button you will need to have your change call access your top level frame and then have the individual frames switch appropriately.

[code]
for (var i = 0; i < document.frames.length; i++)
var document.frames[i].getElementBy(id);
[code]

Something similar to the above might be necessary.

Dan @ Code Town

Dan @ Code Town

Borisz
Obsessive-Compulsive (I) Inmate

From:
Insane since: Nov 2005

IP logged posted posted 11-28-2005 17:15 Edit Quote

Ah, and where should I put that code? I suck at javascript so i have no clue.

thera
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Jan 2006

IP logged posted posted 01-23-2006 21:18 Edit Quote

I have the same problem. Anyone?



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu