Main Page

final step

<form method=”post” action=”DoLogin.jsp”>
<div style=”border: 2px dashed blue; background-color: #dedede; height:
300px; padding: 10px”>
<div id=”divError” style=”position: absolute; left: 20px; top:
100px; “>
This Web application requires one of the following:
<li>Internet Explorer 5.5 or higher for Windows</li>
<li>Mozilla 1.0 or higher for Unix</li>
<li>Safari 1.0 or higher for Macintosh</li>
<div id=”divLogin” style=”position: absolute; left: 20px; top:
100px; visibility: hidden”>
<table border=”0” width=”100%” height=”100%”><tr><td
<table border=”0”>
<td>Username:</td><td><input type=”text”
name=”txtUsername” /></td>
<td>Password:</td><td><input type=”password”
name=”txtPassword” /></td>
<td>&nbsp;</td><td><input type=”Submit” value=”Login”
As a final step, you can include a special notice just in case the user doesn’t have JavaScript or has dis-
abled it. To do this, you use the
tag. Any text within the
tag is ignored if the
browser supports JavaScript. If the browser doesn’t support it (or has it disabled), then the text is dis-
played normally. This should be place in
just after the
<script type=”text/javascript” src=”detect.js”></script>
<script type=”text/javascript”>
window.onload = function () {
if ((isMinIE5_5 && isWin) || (isMinMoz1 && isUnix)
Browser and Operating System Detection
11_579088 ch08.qxd 3/28/05 11:38 AM Page 255

JavaScript EditorFree JavaScript Editor     Ajax Editor