Re: PHP/CSS/Javascript question
| From: | Satyam | Date: | Sun, 12 Mar 2006 18:23:14 +0000 |
| Subject: | Re: PHP/CSS/Javascript question | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-231805@lists.php.net to get a copy of this message | ||
----- Original Message ----- From: "tedd" <tedd@sperling.com>
Hi all,And it affects all documents of all users. Suddenly, by the action of one user, all other users reaching the same page will see things as per the actions of another user. Unless you take care to keep separate CSS files.Satyam said:Is it possible to modify a table using JavaScript to control CSS visabilty when the entire table is developed dynamically using PHP? Thanks, PaulYou don't need to change the CSS (I don't even know if it is possible), but you can change specific styles of any element within the HTML. For example:Yes, it's just a text file -- it can be re-written. However, it needs to be loaded again to take affect.
No, this is not AJAX, it is simply using the DOM. Ajax also involves communication with the server in the background.document.getElementById('IdOfDivContainingTable').style.display='none'; It is particularly usefull to enclose whichever set of elements that you wish to change into a single entity, a DIV or SPAN, if at all possible.That's the main principle of ajax, isn't it? Using DOM to apply changes within the document. It might be old-hat to most, but I find it fascinating.
No, if you dynamically load a new stylesheet after you set the style of an element using the DOM, this style would still have precedence over the new stylesheet. The precedence of styles is set by how you set it. Setting a style through the DOM has precedence over CSS attributes, which have precedence over styles specified by the style HTML attribute which has precedence over the default rendering of an element. Only within the same category the order of assignment would matter. And, by the way, yes, you can load a new stylesheet. SatyamStyles assigned in this way have precedence over those from a style sheetThe precedence is simply inheritance -- last stated is applied.
tedd -- -------------------------------------------------------------------------------- http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php