#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    13
    Rep Power
    0

    Mozilla form submit problem


    I have a problem,

    I am trying to use the following vbscript to automatically submit a form. It works in IE but not in Mozilla. Does anyone have any suggestions on how to make this work?

    <form name="frmUserCode" id="frmUserCode" method="POST" action="http://www.mysite.com/login.asp">
    <input type="hidden" name="UCD" id="UCD" value="<% =str_UserCode % ">
    </form>

    <script type="text/vbscript" language="vbscript">
    <!--
    Document.GetElementByID("frmUserCode").Submit()
    -->
    </script>
  2. #2
  3. mod_dev_shed
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2002
    Location
    Atlanta, GA
    Posts
    14,817
    Rep Power
    1100
    Hmm, vbscript in anything other than IE probably won't work. Why not just use JavaScript?
    # Jeremy

    Explain your problem instead of asking how to do what you decided was the solution.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    13
    Rep Power
    0
    Originally Posted by jharnois
    Hmm, vbscript in anything other than IE probably won't work. Why not just use JavaScript?
    I just got finished trying a javascript version of this and it behaved the same as with vbscript. Worked great in IE and didn't using Mozilla firefox.

    I'm stumped! Any other suggestions.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    13
    Rep Power
    0
    Oh the joys of free enterprise with no standards...

    I found the problem;

    S vs. s in submit. Submit (bad). submit (good) in Mozilla firefox.

    S vs. s in submit. Submit (good). submit (good) in IE.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2009
    Posts
    1
    Rep Power
    0

    you can try this


    document.frmSearch.submit();

IMN logo majestic logo threadwatch logo seochat tools logo