Error Help???

Results 1 to 5 of 5

Thread: Error Help???

  1. #1
    Join Date
    Dec 1969

    Default Error Help???

    Hello,<BR>I have a form and it submits itself back to the same page. In the form, I have a button that calls a JS function that submits the form with a different variable. I have ran this code before but now I keep getting this error:<BR>line 27<BR>Error: object doesnt support this property or method<BR><BR>The error line is the "submit" line in the JS function. My code is as follows:<BR><BR> &#060;SCRIPT Language=JavaScript&#062;<BR> function insetback(theForm)<BR>{<BR> document.theForm.action ="form.asp?addnames=yes"<BR> document.theForm.method ="post"<BR> document.theForm.submit();<BR>}<BR> &#060;/script&#062; <BR><BR>&#060;/head&#062;<BR>&#060;body&#062;<BR>&#060;form name=theForm method=post action=form.asp&#062;<BR>.....form info....<BR>&#060;input type=button name=addmorenames value="Add More Names" onClick="return insetback()"&#062;<BR>&#060;input type=submit value=Proceed name=submit&#062;<BR>&#060;/form&#062;<BR>&#060;/body&#062;<BR><BR>Any help is much appreciated.....Basically my objective, if the button gets pushed, I want a certain valuse in the queryString, if the submit button gets pushed, I want know value in the QS<BR>Thank you

  2. #2
    Medieval Dude Guest

    Default RE: Error Help???

    Make sure you have semicolons at the end of each statement in yer javascript function. Try that for starters.

  3. #3
    Join Date
    Dec 1969

    Default Nope, not it???

    Yes, I have tried that, it still keeps telling me that the opbejct doesnt support this property or method....

  4. #4
    Keith M Guest

    Default Just a suggestion..don't use javascript

    If you&#039;re just using the javascript to submit to the same form (POSTed), why not just use ASP to do it instead?<BR>Change Add More Names to a submit and us an If or Select at the top of the page to figure out what to do.<BR><BR>&#060;input type=submit name=submit value="Add More Names"&#062;<BR><BR>and at the top of the page<BR>&#060;%<BR>If Request.Form("submit")="Add More Names" Then<BR>&#039; do this code<BR>Else<BR>&#039; do this code<BR>End If<BR>%&#062;<BR><BR>again, just a suggestion :)

  5. #5
    RDM Guest

    Default Found problem

    It took a little while but I think I found a place for you to start. If you take out the input submit button, the rest of your code words fine. I&#039;m not sure you can have an input submit button and then call a function that submits the form from some other element. This finding sounds odd and doesn&#039;t make much sense but it does work...You may have to make the input submit button a regular button that calls a different function to post the form.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts