Jump to content
  • Advertisement
Sign in to follow this  
Thoover

JavaScript Help

This topic is 4456 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am useing javascript and the webpage works fine on my computer, but when i upload it to the web, and open the http page it stays blank any ideas? oh and here is the html's javascript: HTML ... BODY ... ... script type="text/javascript" !-- var os = navigator.platform; document.write("Your operating system is " + os + ". "); if(os != "Win32") { document.write("You can't use this page."); } if(os == "Win32") { document.write("You can use this page."); } //! /script ... ... ... /BODY /HTML I couldn't get the cose up with the < > on the forms

Share this post


Link to post
Share on other sites
Advertisement
Post a link to where ever you have this live on the internet. Also, what browser(s) are you trying this in?

Alan

Share this post


Link to post
Share on other sites
Im not a javascript expert, but you could try putting something like alert("running"); after the script type="text/javascript" so you know that the script is actually being executed. That should help you pinpoint where the problem is.

Share this post


Link to post
Share on other sites
Try this:


if (navigator.appVersion.indexOf("Win")!=-1)
document.write("You can use this page.");

else {
document.write("You can't use this page.");
}



-AJ

Share this post


Link to post
Share on other sites
it works on the older computers but not any over win 98 i think becouse it worked at my schools 486DX coms but not 1.3GHZ coms, and it wont work at my house.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!