dynamic form submit

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tulika dutta
    New Member
    • Jun 2007
    • 3

    dynamic form submit

    i want to submit my form dynamicalyy through javascript.

    code:
    <script type="text/javascript">
    function submitForm(){
    document.accoun tForm.action="A ccountInqury.js p";
    document.accoun tForm.submit();
    }
    </script>

    but i m encountering a javascript error:
    " object doesnt support this property or method "
    plz suggest.
    thanx
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    #2
    Originally posted by tulika dutta
    i want to submit my form dynamicalyy through javascript.

    code:
    <script type="text/javascript">
    function submitForm(){
    document.accoun tForm.action="A ccountInqury.js p";
    document.accoun tForm.submit();
    }
    </script>

    but i m encountering a javascript error:
    " object doesnt support this property or method "
    plz suggest.
    thanx
    Welcome to TSDN.
    Plz send me ur HTML code .. then it ll be better to solve ur problem.....

    Kind regards,
    Dmjpro.

    Comment

    • tulika dutta
      New Member
      • Jun 2007
      • 3

      #3
      dynamic form submit

      i want to dynamically submit a form on onChange event of a dropdown box.

      my code :

      <script type="text/javascript">
      function submitForm(){
      document.myForm .action="Accoun t.jsp";
      document.myForm .submit();
      }
      </script>
      <form name="myForm" action="#" method="post">
      <select name="drop" onChange="submi tForm()">
      <option value="1">1</option>
      <option value="2">2</option>
      </select>
      </form>

      I m encountering a javascript error :
      Object doesn't support this property or method.

      I have already tried out this in my another code and that is working fine. but this time i am unable to trace the error.
      plz suggest
      thanx

      Comment

      • dmjpro
        Top Contributor
        • Jan 2007
        • 2476

        #4
        Originally posted by tulika dutta
        i want to dynamically submit a form on onChange event of a dropdown box.

        my code :

        <script type="text/javascript">
        function submitForm(){
        document.myForm .action="Accoun t.jsp";
        document.myForm .submit();
        }
        </script>
        <form name="myForm" action="#" method="post">
        <select name="drop" onChange="submi tForm()">
        <option value="1">1</option>
        <option value="2">2</option>
        </select>
        </form>

        I m encountering a javascript error :
        Object doesn't support this property or method.

        I have already tried out this in my another code and that is working fine. but this time i am unable to trace the error.
        plz suggest
        thanx

        Don't DO Double POST.
        Frnd

        Kind regards,
        Dmjpro.

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by tulika dutta
          i want to submit my form dynamicalyy through javascript.

          code:
          <script type="text/javascript">
          function submitForm(){
          document.accoun tForm.action="A ccountInqury.js p";
          document.accoun tForm.submit();
          }
          </script>

          but i m encountering a javascript error:
          " object doesnt support this property or method "
          plz suggest.
          thanx
          Well since you've done this before in some pages. Just cross check how you did it there with how you're doing it now.
          And next time please use code tags when posting code.
          P.S Threads merged.

          Comment

          Working...