CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Sending two forms - one click

Print topic Send  topic

Author Message
Alejandro
Posted: 01/19/2004, 2:12 PM

I was wondering how can I process update for 2 forms in the same page with only one click?
Thanks for any idea.
peterr


Posts: 5971
Posted: 01/19/2004, 2:23 PM

Please see:
http://forums.codecharge.com/posts.php?post_id=25612

The only way to do this is by using a lot of JavaScript and copying the information from 1 form to hidden fields of the 2nd form when it is submitted.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
Waheed Ahmed
Posted: 06/21/2005, 3:18 AM

This is solution

<script language="javascript">
function doMagic(thePage ){
document.forms[0].action=thePage;
document.forms[0].submit();
}
</script>
.
.
.
<form method=post>
Name <input type=text name="abc">

<button onclick="doMagic('takedata.php');">Submit 1</button>
<button onclick="doMagic('takedata.asp');">Submit 2</button>
</form>


take care and enjoy
waheed Ahmed
Posted: 06/21/2005, 3:22 AM

<script language="javascript">
function doMagic(thePage ){
document.forms[0].action=thePage;
document.forms[0].submit();
document.forms[1].submit();

}
</script>
.
.
.
<form method=post>
Name <input type=text name="abc">

<button onclick="doMagic('takedata.php');">Submit 1</button>
</form>

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.