Forum Moderators: open
function dl(id) {
var pass = document.getElementById("pass" + id).value;
if (pass == "") {
alert("Please enter a password!");
}
else {
window.location.href = "download.php?id=" + id + "&pass=" + pass;
}
}
This is the HTML:
<TD WIDTH=135 HEIGHT=15><input type="password" class="pword" name="pass2"></TD>
</TR>
<TR>
<TD ROWSPAN=2>
<a href="#" onclick="dl(2);"><IMG SRC="images/submit.png" WIDTH=69 HEIGHT=27 ALT="" border="0"></a></TD>
</TR>
It should be picking up "pass2" when they click on submit but firefox gives the error:
Error: document.getElementById("pass" + id) has no properties
This works in IE however... Any ideas?