Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Testing for javascript!

Status
Not open for further replies.

retrodans

Programmer
Dec 13, 2005
15
GB
Is there a way of finding whether the browser uses javascript before the page loads? I have some javascript that alters the styling of the page, and need it to be this way to keep the site accessible. At the moment, the styles flicker from one to the other.

I understand that PHP is serverside, but is there anything in the headers that I can use. Any ideas would be most appreciated.
Dan
 
Ok thanks, I had a look at the headers, all it had in there was flash and xml. Is there no other way around this flicker issue, other than losing out on the side of accessibility (it's a scrollbar that is being hidden by the javascript to replace with a fancy looking one)
 
Hi

No idea what are you trying to do, but I am sure it can be solved without knowing about the client's JavaScript on the server.

I thing you should post this in forum216 with more details.

Feherke.
 
use a meta redirect in your landing page. it should redirect to the same page with a query string of noJS

test for noJS in your php script and deliver an appropriate style sheet.

then include some js to cancel the meta redirect. if JS is switched on then you've delivered the right style sheet. if not then you will be able to use php to do so.

for help on the JS go to the forum feherke directed you to.
for help on the meta redirect, post back here (or in any of the webby forums).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top