Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
I have a HTML form with 2 submit buttons one is for clear
values in text controls using javascript functiion
and the other one to open the PHP page.
when i click the clear button it opens the php page
i have called the clear function onClick event of the cleat button, but the button type is submit
this is the clear function
[syntax="javascript"]
function clearAll(){
var texts=document.getElementsByTagName('input')
for (var i_tem = 0; i_tem < texts.length; i_tem++)
if (texts[i_tem].type=='text')
texts[i_tem].value=''
}
</SCRIPT> THIS IS THE html coding
Code: Select all
<form method="POST" action="complaintrdata.php">
<input type="submit" name="cmdOK" value="OK" >
<input type="submit" name="cmdClear" value="Clear" onClick="clearAll();">
</form>what is the proble in this code pls help me
thanks
shiran
Pimptastic | Please use[/syntax]
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]