How can I pass user's browser, OS and resolution information to the
form element?
I need to make radiobuttons to be checked by default according to the
user's information.
For example,
if visitor's browser is IE I would like the radiobutton with
value="Internet Explorer" to be checked by default.
Thanks.
Here is the part of the form:
<html>
<head>
<script language="JavaS cript">
var browserName = navigator.appNa me
var browserVersion = navigator.appVe rsion
var OS = navigator.userA gent
var screenWidth = screen.width
var screenHeight = screen.height
document.write( "Browser: <b>"+ browserName + " ??" +
browserVersion + "</b><br>")
document.write( "OS: <b>" + OS + "</b><br>")
document.write( "Screen resolution: <b>" + screenWidth + "
</b>x<b> " + screenHeight + "</b><br>")
</script>
</head>
<form name="form1" method="post" action="">
<input type="radio" name="browser" value="Internet
Explorer">Inter net Explorer<br>
<input type="radio" name="browser" value="Netscape ">Netscape< br>
<input type="radio" name="browser" value="Other">O ther<br>
<hr color="red" width="200" align="left">
<input type="radio" name="OS" value="Win 95">Windows 95<br>
<input type="radio" name="OS" value="Win XP">Windows XP<br>
<input type="radio" name="OS" value="Win 2000">Windows 2000<br>
</form>
</html>
form element?
I need to make radiobuttons to be checked by default according to the
user's information.
For example,
if visitor's browser is IE I would like the radiobutton with
value="Internet Explorer" to be checked by default.
Thanks.
Here is the part of the form:
<html>
<head>
<script language="JavaS cript">
var browserName = navigator.appNa me
var browserVersion = navigator.appVe rsion
var OS = navigator.userA gent
var screenWidth = screen.width
var screenHeight = screen.height
document.write( "Browser: <b>"+ browserName + " ??" +
browserVersion + "</b><br>")
document.write( "OS: <b>" + OS + "</b><br>")
document.write( "Screen resolution: <b>" + screenWidth + "
</b>x<b> " + screenHeight + "</b><br>")
</script>
</head>
<form name="form1" method="post" action="">
<input type="radio" name="browser" value="Internet
Explorer">Inter net Explorer<br>
<input type="radio" name="browser" value="Netscape ">Netscape< br>
<input type="radio" name="browser" value="Other">O ther<br>
<hr color="red" width="200" align="left">
<input type="radio" name="OS" value="Win 95">Windows 95<br>
<input type="radio" name="OS" value="Win XP">Windows XP<br>
<input type="radio" name="OS" value="Win 2000">Windows 2000<br>
</form>
</html>
Comment