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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What to do with this error "Error: Object required: 'delForm' ?

Status
Not open for further replies.

GeeGee

Programmer
Jul 5, 2000
2
CA
Let me first explain what I'm trying to do.&nbsp;&nbsp;I have a Form ASP page with text boxes and buttons.&nbsp;&nbsp;The Form ASP page contains a delete button (not your typical Reset button)that when pressed with the code:<br><br>&lt;input SIZE=&quot;20&quot; name=&quot;ACTION&quot; value=&quot;Delete Form&quot; TYPE=&quot;SUBMIT&quot;&gt; <br><br>It goes to the second ASP page until it sees the following code:<br><br>&lt;%If ACTION=&quot;Delete Form&quot; Then%&gt;<br> &lt;FORM NAME=&quot;delForm&quot; ACTION=&quot;../asp/Form.asp&quot; METHOD=&quot;POST&quot;&gt;<br> &lt;INPUT NAME=&quot;DEL&quot; VALUE=&quot;delFormValues&quot; TYPE=&quot;HIDDEN&quot;&gt;<br>&lt;% End If %&gt;<br><br>&lt;script LANGUAGE=&quot;VBScript&quot;&gt;<br>Sub Window_onLoad()<br> delForm.Submit()<br>End Sub<br>&lt;/script&gt;<br><br>It executes it and is suppose to return the VALUE=&quot;delFormValues&quot; back to the FORM ASP page and execute the code below:<br><br>VALUE=&quot;&lt;% If ACTIONdel = Request.Form(&quot;DEL&quot;) Then %&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;% If ACTIONdel=&quot;delFormValues&quot; Then %&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;% Response.Write &quot; &quot; %&gt;<br> &nbsp;&nbsp;&nbsp;&lt;% Else %&gt;<br> &lt;% = Request.Form(&quot;variable&quot;) %&gt;<br> &nbsp;&nbsp;&nbsp;&lt;% End If %&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;% End If %&gt;&quot;<br><br>This code will write the VALUE in a text box of the FORM page.&nbsp;&nbsp;Don't ask me why I did my code like this but the point is it gives the following error:<br><br>Error: Object required: 'delForm'<br><br>Does anyone know why and suggest something?<br>
 
First of all I think the line:<br>&lt;%If ACTION=&quot;Delete Form&quot; Then%&gt;<br>should read:<br>&lt;%If request.form(&quot;action&quot;)= &quot;Delete Form&quot; Then%&gt;<br><br>Second, the problem is definitely with your function, which you have written in VBScript, but submit() function is not a VBScript function.<br><br>Third, why don't you just place your hidden field &quot;Del&quot; on the same Form.asp page and submit this page to itself without using this intermediate page, which just checks if the &quot;delete form&quot; button was clicked and redirects to Form.asp?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top