How to send options from a form?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • LazyPrinzez
    New Member
    • Jan 2010
    • 13

    How to send options from a form?

    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.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    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.
    Last edited by Dormilich; Jan 18 '12, 09:32 AM.

    Comment

    • LazyPrinzez
      New Member
      • Jan 2010
      • 13

      #3
      Thank you so much for this...and thank you for the precise answers... =)

      Comment

      Working...