Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

POST not sending to a new page

Status
Not open for further replies.

NTSGuru

Programmer
Jul 25, 2000
52
I am new to Forms....

I have


<form action=&quot;Verify.asp&quot; method=&quot;post&quot;>

''recordsetcode
<INPUT type=&quot;checkbox&quot; id=chkItem name=chkItem value=&quot;<%=trim(oRstProduct(&quot;SubCode&quot;))%>&quot;><BR>
''recordsetcode

<input type=&quot;submit&quot; value=&quot;send&quot;>
</form>

When I click the submit button, it does not redirect to my &quot;Verify.asp&quot;. What am I doing wrong? If I post to the same web page, I can get see the Form info....

TIA
Fred
 
I tried replicating your situation on my machine and ran into something...I noticed that the recordset information was NOT enclosed in script delimiters. Could this be it? Here's how I solved your problem:

********** FORM.ASP **************

<html><body>

<form action=&quot;Verify.asp&quot; method=&quot;post&quot;>
<%

'' recordset info here

%>
<INPUT type=&quot;checkbox&quot; id=chkItem name=chkItem value=&quot;<%=trim(oRstProduct(&quot;SubCode&quot;))%>&quot;><BR>

<%

'' recordset info here

%>
<input type=&quot;submit&quot; value=&quot;send&quot;>
</form>

</body></html>

***************************************
*********** VERIFY.ASP *****************

<% @ Language=VBScript %>

<%
Dim checkbox
checkbox = Request.Form(&quot;chkItem&quot;)

Response.Write(&quot;This is the value of <b>chkItem</b>: &quot; & checkbox)

%>
***************************************

Hope this helps!
 
jason,

my code does have the script delimiters. I just did not include it in my message. when I click &quot;submit&quot; button, the page refreshes, and if i put the following code in the same base page :

<%
dim i
i = Request.Form(&quot;chkItem&quot;).Count
for i = 1 to Request.Form(&quot;chkItem&quot;).Count
Response.Write Request.Form(&quot;chkItem&quot;)(i) & &quot;<BR>&quot;
next

%>

I get the values that I had just checked... but it won't redirect to my verify.asp page at all....


I'm at my wit's end...

TIA
Fred
 
Fred,

There's something more to it. Load that form page up in your browser window, view source and copy the source back here. Let's take a look at the whole page. My guess is that you might have a tag problem in your HTML, so the browser might be faltering on your opening form tag.

ToddWW
 
I don't know what the problem was, but i copied/pasted the code into a new ASP and now it works fine. it's the same code, even the same page name (after I renamed them).

I guess it's just one of those days...

thanks for the help all!!

Fred
 
See, I said there was something more to it. :)

ToddWW
 
That'll do it...whenever people have problem with ASP, I just tell them to copy-and-paste the code into NotedPad and then re-write the script anew. This usually does it.

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top