SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member (--eRRoR--)'s Avatar
    Join Date
    Apr 2012
    Location
    Perugia, Italy, Italy
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Submit button not working on Firefox

    So helo there all.
    I aplyed a java script to an php file i have to prevent users pressing to many times on a button in my web shop.
    The script works perfect in Chrome.I Firefox it does this.


    Here is the code

    HTML Code:
    <SCRIPT LANGUAGE="JavaScript" TYPE="text/JavaScript">
    function formControl(submitted) 
    {
       if(submitted=="1") 
        {
       commentForm.Submit.disabled=true
       //alert("Processing,please wait...")
        } 
    }
    </SCRIPT>
    PHP Code:
           echo '<FORM action="" method="post" enctype="text/plain" name="commentForm">';
    echo 
    '<input type="submit" name="Submit" onclick="javscript:location.href=\'./buy.php?v1='.$v1.'&v2='.$v2.'&co='.$item.'\';formControl(1);" value=\'Yes I am\'>';
          echo 
    '<input type="button" onclick="javscript:location.href=\'./webshop.php?v1='.$v1.'&v2='.$v2.'\'" value=\'No I`m not\'>';
          echo 
    '</FORM>'

  2. #2
    SitePoint Member (--eRRoR--)'s Avatar
    Join Date
    Apr 2012
    Location
    Perugia, Italy, Italy
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Bump,anyone can help me please?

  3. #3
    SitePoint Member (--eRRoR--)'s Avatar
    Join Date
    Apr 2012
    Location
    Perugia, Italy, Italy
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can no one help me please?

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,096
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Maybe you should post a working example or a live link. What you gave above is not a lot to go on. The code can't be grabbed and tested easily.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  5. #5
    Non-Member
    Join Date
    Jul 2012
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's lots of things wrong with your code.

    Just a few:

    1. your submit button should not have an onclick event handler.

    2. The form could have an onsubmit event handler which controls whether the form is actually submitted or not depending on the user inputs.

    3. You have spelling typos in your code.

    4. onclick even handlers should not have a javascript pseudo protocol.

  6. #6
    SitePoint Member (--eRRoR--)'s Avatar
    Join Date
    Apr 2012
    Location
    Perugia, Italy, Italy
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not really good at this and the code was not made by me.
    Here is the site http://cabal.elitegamers.co/shop and the login is
    tester
    pass tester87


Bookmarks

Posting Permissions

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