We come across various time that we need to change the form action according to the Event
Let me provide a simple JavaScript Example which will help you
<script type=”text/javascript”>
function changeAction(url){
alert(url);
document.this_form.action = url;
}</script>
HTML
<form method=”POST” name=”this_form” action=”http://www.minervait.com”>
<input type=”radio” name=”PromotionPackets” value=”http://www.minervait.com” onClick=”changeAction(this.value);”>Minervait.com
<input type=”radio” name=”PromotionPackets” value=”http://www.minervainfocom.com” onClick=”changeAction(this.value);”>Minervainfocom.com
</form>
Please find its EXAMPLE
We will keep posting more such handy function.
Minerva Infotech is Leading Best PHP & JavaScript Programming company






























































