A Digital Age Deserves A Digital Leader

java/javascript/cookie detection

java/javascript/cookie detection

Postby c0ldfyr3 » Wed Jun 18, 2008 9:32 am

i need to check the client-side computer for a valid version browser, to see if java, javascript, and cookies are enabled, and then take the appropriate action to either redirect the browser to a java disabled site or enable java/cookies on the persons computer. and/or to request them to update their browser or use a diffirent browser.

so far i have this...

detectBrowser.js
Code: Select all
function detectBrowser()
{
var browser=navigator.appName
var b_version=navigator.appVersion
var version=parseFloat(b_version)
if ((browser=="Netscape"||browser=="Microsoft Internet Explorer")
&& (version>=4))
  {alert("Your browser is good enough!")}
else
  {alert("It's time to upgrade your browser!")}
}

to detect the browser...



javaDetect.js
Code: Select all
var jEnabled = navigator.javaEnabled();
if (jEnabled){
window.location = "java_enabled.html"
}else{
window.location = "java_disabled.html"
}

to see if java is enabled and send to the appropriate page..


Code: Select all
function cc()
{
  if (document.cookie == "")
  {
   alert("COOKIES need to be enabled!");
document.Form1.cookieexists.value ="false" 
  } else {
   window.location = "start.html";
document.Form1.cookieexists.value ="true"
  }
}
document.cookie = 'killme' + escape('nothing')


To see if cookies are enabled then send to the appropriate page.

now here is where i need help....

i need to enable java/javascript/cookies from the browser via a button if possible or sending the user to install java. then if everything goes well send them to the index.
Image
PRO Level 15
User avatar
Posts: 1346
Joined: Sun May 02, 2004 8:49 pm
Location: 127.0.0.1

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 3 guests

cron
cron