By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,398 Members | 1,362 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,398 IT Pros & Developers. It's quick & easy.

How to send options from a form?

LazyPrinzez
P: 13
I'm fairly new to javascript and along with it, I'm using PHP for server-side scripting. It's really hard to put the problem into words, but here's the scenario:

In clicking a link, I want a confirmation box to pop-up. I know js's confirm() function does this, but I'm not sure about that really, because I want the confirmation box to display 3 buttons: a 'cancel' button, a 'yes' button and a 'no' button, where buttons 'yes' and 'no' should lead to two different links which will be provided via PHP (because the links are dynamic).

Before anything else, I'd just like to ask first if this is possible.
Secondly: can I do this in Javascript?
Third: If it's possible, and if I can do it in JS, then what function should I use?
Please also post any other opinions and notes regarding the matter. I'd love to learn more about it.
Jan 18 '12 #1

✓ answered by Dormilich

Before anything else, I'd just like to ask first if this is possible.
Secondly: can I do this in Javascript?
Third: If it's possible, and if I can do it in JS, then what function should I use?
1) yes
2) yes
3) there is no native JS function for that.

what you have to do is create a HTML form that acts like the modal window you desire. creating that is greatly improved by using jQuery and jQuery UI (or similar frameworks) which make this process relatively easy. cf. jQuery UI dialog.

Share this Question
Share on Google+
2 Replies


Dormilich
Expert Mod 5K+
P: 8,639
Before anything else, I'd just like to ask first if this is possible.
Secondly: can I do this in Javascript?
Third: If it's possible, and if I can do it in JS, then what function should I use?
1) yes
2) yes
3) there is no native JS function for that.

what you have to do is create a HTML form that acts like the modal window you desire. creating that is greatly improved by using jQuery and jQuery UI (or similar frameworks) which make this process relatively easy. cf. jQuery UI dialog.
Jan 18 '12 #2

LazyPrinzez
P: 13
Thank you so much for this...and thank you for the precise answers... =)
Mar 8 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.