OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
Advantages to breaking up style sheets?
This page's ID:
10990
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Arrrr... Now I got yah. ;) I wasn't aware you could make calls to PHP in javascript like that. The mind tickles with the posibilties. :D Although, doing this for styles isn't the best idea IMHO. First off, you can't really cache a PHP file so this method will be even more bandwidth unfriendly seeing as the browser will most likely need to load the output of that PHP file every time it's called. It is however, a very nice way of abstracting the styles from the markup and if you don't have too much style info then all is good. Although, seeing as this is being called onLoad it won't call that change untill the rest of the HTML content has loaded. I wonder what would happen if you set the href value of a standard link element to a php file?... Would that file get processed by PHP or not? eg: <link rel="stylesheet" media="screen" type="text/css" href="myStyles.php?styleId=blackOnWhite" /> Which would eliminate the need for Javascript all togther and it'd load straight away but that's only if the file is processed my PHP before it's sent to the browser as a stylesheet. Whilst lumping all of the styles in the one spot like this is a nice idea, it still doesn't fit in well with some browsers native ability to switch styles, which will hopefully become a more accessable option in future browser releases. Suho, I didn't really get a good look at the way you'd coded your site before I deleted the file, (yup, definatly gone, not even in ta recycle bin anymore, but I think I still have it in my email, I'll have another peek at it later). Although, if you think something your trying to do should be a lot easier then just pop into the Server Side Coding forum and ask. Most coders love exploring different ways to do things and I'm sure you'll get heaps of people tell you how they'd go about to it. If your having issues with the JS for the changes to the style switcher just grab me on ICQ. I'll be on and off most throughout weekend. I've had to put my site on hold (for the fourth time this year!) as I have some paid web work to do at the moment. [url=http://dracusis.deviantart.com/] [img]http://www.whatever.net.au/~cameron/files/images/ozone/ArtDecoSiggy.gif[/img] [/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »