Monday 15 March 2010

javascript - php if i click the button program reload page and never continue execute the code -


When I press the first button 'no' the page shows me two more buttons.

If I click the second 'No' button reloads from the page, how can I stop it from reloading and continue to execute the code?

This is my code:

  & lt; Form name = "form1" method = "post" & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt; Input type = "submit" name = "no" value = "no" & gt; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Lt; Input type = "submit" name = "yes" value = "yes" & gt; & Lt; Br / & gt; & Lt; Br / & gt; & Lt ;? Php if (isset ($ _ POST ['no'])) {? & Gt; & Lt; Input type = "submit" name = "no 1" value = "no" & gt; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Amp; Nbsp; & Lt; Input type = "submit" name = "yes1" value = "yes" & gt; & Lt ;? Php if (isset ($ _ POST ['no1'])) {echo 'you no1 click'; } And if (isset ($ _ POST ['yes 1'])) 'echo' you click on yes 1; }} And if (isset ($ _ POST ['yes'])) 'echo' you 'echo'; }? & Gt; & Lt; Div class = "clear" & gt; & Lt; / Div & gt; & Lt; / Center & gt; & Lt; Center & gt; & Lt; / Center & gt; & Lt; / Div & gt; & Lt; / Form & gt;  

What should this script do? If you can provide some more information that can help you to understand the problem.


No comments:

Post a Comment