eRRoR1
July 24, 2012, 1:05am
1
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.
//youtu.be/H_2G2ndbhtQ
Here is the code
<SCRIPT LANGUAGE="JavaScript" TYPE="text/JavaScript">
function formControl(submitted)
{
if(submitted=="1")
{
commentForm.Submit.disabled=true
//alert("Processing,please wait...")
}
}
</SCRIPT>
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>';
eRRoR1
July 24, 2012, 11:30pm
2
Bump,anyone can help me please?
eRRoR1
July 27, 2012, 12:37am
3
can no one help me please?
ralphm
July 27, 2012, 12:47am
4
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.
system
July 27, 2012, 12:59am
5
There’s lots of things wrong with your code.
Just a few:
your submit button should not have an onclick event handler.
The form could have an onsubmit event handler which controls whether the form is actually submitted or not depending on the user inputs.
You have spelling typos in your code.
onclick even handlers should not have a javascript pseudo protocol.
eRRoR1
July 27, 2012, 1:02am
6
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