I wasn't sure if this should be posted in the HTML or Javascript area - myapologies for a wrong placement. Here is my question.
I am working on a page that has an iframe that calls the following html code:
<html>
<head>
<title>Login</title>
<script>
<!--
function SubmitAccCode() {
var flag
if (document.thisform.code.value=='') {
alert("You must enter a valid access code !")
}
else {
flag = true
if (document.thisform.code.value.length==6) { //course access code
document.thisform.action = "http://hthu.coursehost.com/engine/authentication/registration/ChkAccessCode.asp?LID=1&ky=d_BPDiQVRgHzDiPRUmf_DgHzpSrOrRfz"
}
else {
flag = false
alert("You must enter a valid access code !")
}
if (flag) {
document.thisform.method = "post"
document.thisform.submit()
}
}
}
function LoginSubmit() {
if (document.thisform.code) document.thisform.code.value = ""
if (document.thisform.Login.value !='' && document.thisform.Pwd.value != '') {
document.thisform.method = "post" ;
document.thisform.target = "_top" ;
document.thisform.action = "http://hthu.coursehost.com/Groups/Registration/HRLogIn1.asp?LID=1&ky=d_BPDiQVRgHzDiPRUmf_DgHzpSrOrRfz";
document.thisform.submit();
}else {
alert("Please enter your username and password.")
}
}
//-->
</script>
</head>
<body>
<center>
<table width=500 border=0 bordercolor=#000000 cellspacing=0>
<tr>
<td><form name=thisform method=post ID="thisform">
<h2>Username:
<input type="text" name="Login" size="10" ID="Login">
<br>
Password:
<input type="password" name="Pwd" size="10" ID="Pwd">
> <a href="javascript:LoginSubmit();"><strong>Go Now!</strong></a></h2>
<hr>
<h5>Registration & Orientation for Physician Office Employees is FREE. Click here to <u><a href="http://hthu.coursehost.com/enroll/f41au2" target="_top">REGISTER</a></u><br>
<br>
<a href="http://hthu.coursehost.com/engine/authentication/login/password.asp?LID=1&ky=d_BPDiQVRgHzDiPRUmf_DgHzpSrOrRfz" target="_top"> Forgot your password? | </a><a href="http://hthu.coursehost.com/engine/Intranets/Course/PrivateCourses.asp?LID=1&ky=d_BPDiQVRgHzDiPRUmf_DgHzpSrOrRfz" target="_top">Course Catalog</a></h5>
</form></td>
</tr>
</table>
</center>
</body>
</html>
you can see this in action here: http://www.hthu.net/PhysicianOffice.aspx
I need to make a HTML button instead of the Go Now! Link - this way people can press Enter on the keyboard and advance to the next page. This current setup tells the iframe to have the top "window" (_top) to change (this can be seen in the function LoginSubmit().
None the less... how can I make a button - I have tried the following:
<input name="Login" action="javascript:LoginSubmit();" type="button" value="Go Now!">
But this does not work...
Any ideas? Thanks for any help.