www.webdeveloper.com
Results 1 to 3 of 3

Thread: Object doesn't support this property or method

  1. #1
    Join Date
    May 2009
    Posts
    29

    Object doesn't support this property or method

    I am making a form and I am getting this error when I push the reset button or the save button "Object doesn't support this property or method: 'resetall'"
    My reset button says this..

    Code:
    <input type="button" name="resetall" onclick="resetall()" value="Reset All">
    and the reset function is this..

    Code:
    function resetall()
    {
    	uid.value=""
            ban.value=""
            casesban.value=""
            casesissue.value=""
            calltype.value="selecttype"
            issue.value="selectissue"
            subissue.value="selectsub"
            brief.value=""
            ctv.value="selectsub"
            resolution.value="selectresolution"
    }
    I tried to google it and it is saying something about the form doesn't support it but I have another hta file that I use the same code on and it works fine.
    Last edited by dumbestcrayon; 05-18-2009 at 10:06 AM.

  2. #2
    Join Date
    Jun 2007
    Posts
    667
    The form elements being addressed are out of scope. Assuming that uid, ban etc are element names not IDs, try it like this:
    Code:
    <input type="button" name="resetall" onclick="resetall( this.form )" value="Reset All">
    Code:
    function resetall( theForm )
    {
      with( theForm )
      {
    	uid.value=""
            ban.value=""
            casesban.value=""
            casesissue.value=""
            calltype.value="selecttype"
            issue.value="selectissue"
            subissue.value="selectsub"
            brief.value=""
            ctv.value="selectsub"
            resolution.value="selectresolution"
      }
    }

  3. #3
    Join Date
    May 2009
    Posts
    29
    I figured it out.
    I deleted the line
    Code:
    <form id=form1 action="post">
    and changed the name of the buttons from submit to submit1 and from save to saveandreset.


    Thanks for the help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles