PDA

View Full Version : submit form through text link.


Gibberish
09-22-2004, 07:30 PM
is this how I would accomplish this? I get an error ofcourse.


<html>
<head>
<script language="JavaScript" type="text/javascript">

function loginFunc (){
document.loginForm.LOGINID.value = "blah" ;
document.loginForm.PASSWORD.value = "blahblah" ;
document.loginForm.PortalCode.value = "New User" ;
document.loginForm.submit() ;
}
</script>

</head>
<body>

<form name="loginForm" action="https://myloginpage.com/login.php" method="post" target="_blank">
<input type="hidden" name="LOGINID">
<input type="hidden" name="PASSWORD">
<input type="hidden" name="PortalCode">
<a href="javascript:loginFunc()">Enter Here</a>
</form>

</body>
</html>

Gibberish
09-27-2004, 10:58 PM
im an idiot it works fine, had a script error on something else that was breaking it.