Jump to content

onClick used in a form..


SephirGaine

Recommended Posts

Hey ya'll.  Basically, I want to have two submit buttons, each going to a different page. I figure I'll lead one like normal, and have it go to my action="" page.

But, my second one I want to go to a seperate page. I understand that Javascript works for this using the onClick tag, but I haven't been able to get it working. So far..

[code]onClick="parent.location='closelead.php'[/code]

That's what I'm working with. Any help would be appreciated.
Link to comment
https://forums.phpfreaks.com/topic/21588-onclick-used-in-a-form/
Share on other sites

[b]shadowcaster[/b]: Just in the same page will work fine. So preferably, that'll be my route.

[b]snorkler[/b]: That was an idea that came to mind, but it seems to be a lot more work than deems necessary. If there's a way to basically have 2 submit buttons on a single form, each leading to different pages, that'll save me time, effort, and probably a bit of frustration to do it that way. If this falls through that's what I'll do however.
Link to comment
https://forums.phpfreaks.com/topic/21588-onclick-used-in-a-form/#findComment-96446
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.