On Jan 30, 5:09 pm, Curtis.Dani...@ gmail.com wrote:
1)Find your button
ex:var myu_btn = document.getEle mentById("submi t_btn");
2)disable it
myu_btn.disable d = true;
A button being disabled or inabled is just one of it's attributes.
Alternately you can search your page for all input tag elements where
the type attribute is 'button' or 'submit' and disable them. For more
info just google input tag attributes.
On Jan 30, 6:26 am, "Sonnich" <sonnich.jen... @elektrobit.com wrote:
Thanks
I found something like:
function disableSubmits( form)
{
for (var i = 0; i < form.elements.l ength; i++)
if (form.elements[i].type.toLowerCa se() == 'submit')
form.elements[i].disabled = true;
}
and...
echo "<form method=post name='myform' action='".$sTem p."'
ONSUBMIT=\"if (this.submitted ) return false; else
{ this.submitted = true; disableSubmits( this); return true; }\"
>";
but my problem is that I have 2 buttons for submit (2 ways), and when
adding this only the first one works - it disable the buttons, but
also the functionality of the second one.
can anyone help
BR
S