View Single Post
  #1 (permalink)  
Old Nov 24th, 2005, 15:24
ClaireB ClaireB is offline
Junior Member
Join Date: Sep 2005
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Auto Submitting a Form

Hi Everyone,

Before I start to explain my problem, I've probably gone a bit around the houses but here it is anyway...

I'm trying to take the information entered as a username and password in an ASP form, validate it and then either redirect to an "Incorrect" page or auto submitted the information via a new form to the "Details" page.

I want the Details page to open in a new window and I want the form submitted so that I can avoid Session variables and QueryStrings.

The redirect to the "Incorrect" page is not a problem, but when I'm trying to do the "Deatils" page I can't seem to open a new window and pass the values over and retrieve them using Request.Form. Currently I'm trying to do it this way:

<form name="UserDetails" method="post" action="javascript:window.open('LoggedIn.asp');sel f.location('Index.asp');">
<input type="hidden" name="From" value="login">
<input name="Username" type="hidden" value="<%=username%>"><br>
<input name="Password" type="hidden" value="<%=password%>">
</form>

<script language="javascript">
document.forms['UserDetails'].submit();
</script>

Can anyone tell me where I'm going wrong?
Reply With Quote