Is it possible to run a script which checks a field in a page as it loads, and then assign a certain css file to the page depending on that field's value?
It should be possible with javascript also but as with php you will need to reload the page for the changes to take effect. It's not a lie if you believe it!
You can use JS for that also, mind telling us what you by 'checking the value of some field'??
If you mean assign one CSS class for <td> and another class for another <td>, you can do that without any kind of dynamic scritping...
Give us an example of what you mean and maybe we can help... I have not failed; I have merely found 100,000 different ways of not succeding...
When the user loggs on, I check a field value in the page e.g. the username supplied before, group membership in the company (this is a commercial product).
So, I need to set the css file I use for the page, but only after the page has finished loading.
Have produced a website for a counterstrike clan and have used a script which allows you basically stack layers ontop of each other and display them based on an onclick event. I am trying to "out-source" to contaent of these layers using the ILayer tag. The problem i have is that the custom scroller that is used with the script (allows you to scroll the hidden content of the layer based off an onmouseover event) doesnt work in conjunction with the ilayers and i was hoping someone could either explain a better way to do this or to advise me how to fix it.
The page in question is the members page (see link in left nav bar), navigate to some other pages to see an example of the script and use the scroller at the bottom of the page.
I assume your doing the user identification server side so why not do the css nomination in server side script?
<%
If usergroup="somegroup" then
%>
<link rel="stylesheet" type="text/css" ref="css/A.css">
<%
Else
%>
<link rel="stylesheet" type="text/css" ref="css/B.css">
<%
End If
%>
can't. The server-side application (c++) is fixed, only the UI scripting may be changed. Of course, I am able to place new .css/.js files on the server
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.