Maq Posted August 22, 2008 Share Posted August 22, 2008 I have a simple form: </pre> <form action="terminate.jsp" method="post"> account: < But I want to send a URL as well as calling the "terminate.jsp" file. Is there a way to have multiple actions on submission or is there another way to do this? Quote Link to comment https://forums.phpfreaks.com/topic/120915-solved-multiple-form-actions/ Share on other sites More sharing options...
akitchin Posted August 22, 2008 Share Posted August 22, 2008 assuming you mean you want to pass URL variables as well, you can simply specify them directly in the action attribute: <form action="terminate.jsp?var=value" method="post"> Quote Link to comment https://forums.phpfreaks.com/topic/120915-solved-multiple-form-actions/#findComment-623302 Share on other sites More sharing options...
Maq Posted August 22, 2008 Author Share Posted August 22, 2008 Sorry if I wasn't clear. Let me explain. I have an affiliate program and when we terminate an account we must send a void URL with some vars in it back to the program. I also want to return to the "terminate.jsp". I don't need to pass any vars to "terminate.jsp". So my question is how can I send both URL's. I ultimately want to end up at "terminate.jsp" but I want to call the other affiliate URL when the user clicks the submit button. Is this a better explanation of my problem? Quote Link to comment https://forums.phpfreaks.com/topic/120915-solved-multiple-form-actions/#findComment-623305 Share on other sites More sharing options...
akitchin Posted August 22, 2008 Share Posted August 22, 2008 you'd need a way of forwarding the user from the initial target (the page that nullifies the account) to terminate.jsp. do you have access to the affiliate's page, or is it on their website? if so, you may be able to construct a cURL request or use sockets to do so. Quote Link to comment https://forums.phpfreaks.com/topic/120915-solved-multiple-form-actions/#findComment-623308 Share on other sites More sharing options...
Maq Posted August 22, 2008 Author Share Posted August 22, 2008 I do not have access to the affiliate's page. All I need to do is redirect to the URL, maybe in another window, but still call the "terminate.jsp" file. Not sure how to do this all in one when the user clicks the submit button. Quote Link to comment https://forums.phpfreaks.com/topic/120915-solved-multiple-form-actions/#findComment-623319 Share on other sites More sharing options...
akitchin Posted August 22, 2008 Share Posted August 22, 2008 ah - one option would be to write some javascript which opens the affiliate target in a new window, sends the current window to terminate.jsp. Quote Link to comment https://forums.phpfreaks.com/topic/120915-solved-multiple-form-actions/#findComment-623322 Share on other sites More sharing options...
Maq Posted August 23, 2008 Author Share Posted August 23, 2008 Thanks akitchin, I will let you know how it goes. Quote Link to comment https://forums.phpfreaks.com/topic/120915-solved-multiple-form-actions/#findComment-623970 Share on other sites More sharing options...
Maq Posted August 26, 2008 Author Share Posted August 26, 2008 Thanks, akitchin. Everything works now. I used: ","new",",resizable=1,toolbar=no,width=550,height=250") So now the current window stays on terminate.jsp and it also opens a pop-up window to call the URL for the affiliate. -Tim Quote Link to comment https://forums.phpfreaks.com/topic/120915-solved-multiple-form-actions/#findComment-625981 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.