java/javascript/cookie detection
1 post
• Page 1 of 1
java/javascript/cookie detection
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.
1 post
• Page 1 of 1
Return to HTML, CSS, and Scripts
Who is online
Users browsing this forum: No registered users and 3 guests