Hey there I was wandering if somebody chould help me becuase I would like to know how to change a forms action when you click on a button ?

Or...

How to load a new form in the same webpage when you click on a button?
I have managed to load images but I'am struggling with Forms.

Could you please help me ?

I made a small sample code on how to do this:

<script type="text/javascript">
function changeAction(formid, actionvalue) {
 document.getElementById(formid).action = actionvalue;
}
</script>
<form action="formhandler1.php" id="form1">
<input type="button" onclick="changeAction('form1', 'formhandler2.php')" />
<input type="submit" value="submit" />
</form>

Wow I never really thought of that thank you!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.