I am currently creating a site that is going to use lots of javascript, but if a users browser does not have javascript enabled then i want them to access stuff via php. Here is what I have in my pages...
Here is my javascript...Code:<body onload="javascript:JavaScriptCheck('JavaScriptHidden')"> <input id="JavaScriptHidden" type="hidden" value="no" />
What I want this to do is when the page loads to make the value of the hidden field 'yes' through the use of javascript. If the field changes from no to yes then I know javascript is enabled. Can anyone tell what I am doing wrong so that this procedure will work?Code:function JavaScriptCheck(HiddenField) { var Hidden = document.getElementById(HiddenField); Hidden.value = "yes"; }
Thanks in advance for your help.







Bookmarks