www.webdeveloper.com
Results 1 to 2 of 2

Thread: Work in IE not any other

  1. #1
    Join Date
    Sep 2011
    Posts
    2

    Work in IE not any other

    i have javascript function to
    1-conform submittion of form
    2-validate textboxes filled or not
    3-submit <form>

    above 3 tasks are done in the same function.
    IE works fine

    Google chrome, Firefox, Opera, Safari works half
    means submit form does not working
    my function is below

    function abc()
    {
    var c=confirm("Do u want to process?");
    if(c)
    {
    var a = document.getElementById("txtName").value;
    if(a.length==0)
    {
    alert ("Enter your name please...");
    }
    else
    {
    document.forms("myform").submit();
    }
    }
    }

  2. #2
    Join Date
    Nov 2010
    Posts
    1,036
    cross browser:

    Code:
    document.forms[0].submit()
    (or change the zero to whatever number form you are referring to)

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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