E
evan.tually
I'm new to trying to use javascript, so I'm probably doing something
wrong.
This code works with MSIE, but not with Firefox. And advice greatly
appreciated.
In HTML page "head" section, I have this line:
<script language="javascript" type="text/javascript"
src="lib/form.js"></script>
In the "body", this is the FORM:
<form>
<input type="button" value="Log in to Upload" onClick="login()"> <br>
<input type="button" value="Forgot Password" onClick="sendpw()">
<input type=text name="pwd" size="48"> Enter registered email address
and click "Forgot Password"
</form>
The file "form.js" contains:
function login() {
vMsg="lib/login.php";
window.location=vMsg;
}
function sendpw() {
pw=document.getElementById('pwd').value;
if (pw == '') {
alert("Enter a valid email address");
}
else {
vMsg="lib/check.php?USERPW="+pw;
window.location=vMsg;
}
}
Thanks in advance,
Evan
wrong.
This code works with MSIE, but not with Firefox. And advice greatly
appreciated.
In HTML page "head" section, I have this line:
<script language="javascript" type="text/javascript"
src="lib/form.js"></script>
In the "body", this is the FORM:
<form>
<input type="button" value="Log in to Upload" onClick="login()"> <br>
<input type="button" value="Forgot Password" onClick="sendpw()">
<input type=text name="pwd" size="48"> Enter registered email address
and click "Forgot Password"
</form>
The file "form.js" contains:
function login() {
vMsg="lib/login.php";
window.location=vMsg;
}
function sendpw() {
pw=document.getElementById('pwd').value;
if (pw == '') {
alert("Enter a valid email address");
}
else {
vMsg="lib/check.php?USERPW="+pw;
window.location=vMsg;
}
}
Thanks in advance,
Evan