Forum Moderators: open

Message Too Old, No Replies

Switching iframe stylesheet along with invoking page

seeking solution for styleswitcher switching page's and iframe's css

         

felixv

4:13 pm on Jul 2, 2003 (gmt 0)

10+ Year Member



Hi

I'm building a personal site that uses styleswitcher.js to change selected css. I'd like to be able to switch both the invoking page's stylesheet and the stylesheet used by the content of an iframe on the page.

Any suggestions, cos I'm stuck!

Many thanks

Felix

tedster

7:12 pm on Jul 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld, felix.

Without knowing exactly how styleswitcher.js works, it's hard to give you a solid answer.

Is this a style choice that your USER makes on the main page? Or does the code check for BROWSER version and automatically switch stylesheets as needed?

It does seem to me that you could pass a variable to the iframed document, or have a script in the head of that document that looks at the variable in the parent window. If the iframe is alread loaded, the styleswitcher.js would also need to force a reload for the iframe.

The specifics might get a bit messy, but it sounds do-able.