SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    586
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Jquery Pass form data inside Modal box

    Hello forums.

    How do you pass form data inside a modal box?

    PHP Code:
    <form action ="recieve.php" method post>
       <
    select name="test">
          <
    option value="1">A</option>
          <
    option value="2">B</option>
       </
    select>
     
       <
    input type="submit" name="submit" />
    </
    form
    recieve.php:
    PHP Code:
    <?php  echo  $_POST['test'?>
    When I submt this form how do I open a new modal box with recieve.php in it.
    I have no clue.
    any ideas? Thanks
    Don't Panic

  2. #2
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    586
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm no reply? does this mean it isn't possible?
    Don't Panic

  3. #3
    Learning... tahirjadoon's Avatar
    Join Date
    Jan 2003
    Posts
    775
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is doable, do you have a sample code that we can look at?

    If not then you'll need to do some thing like below:

    1. Create button click or form submit event
    2. get your form data, use .seralize()
    3. using .ajax (type = post) or short hand .post, pass the data to the page
    4. you'll receive the results back via call back which you can then show in the same modal window or close first modal window and open new and then show the results.

    Take a look at the following tutorials, specially day 10 and 14:
    http://net.tutsplus.com/articles/web...-video-series/

    And at this post, a lot of helpful links specified in this one:
    http://www.sitepoint.com/forums/showthread.php?t=639320
    The beauty of life is not dependent on how happy you are,
    but on how happy others can be because of you...

  4. #4
    SitePoint Evangelist stonedeft's Avatar
    Join Date
    Aug 2009
    Posts
    586
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the links headed right there now
    Don't Panic


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •