SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict sparkdigital's Avatar
    Join Date
    Feb 2005
    Location
    Kendal, Cumbria - The Lake District, UK
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How do I make the results of a form appear in a pop-up window?

    Does anyone know how to make the results of a form action appear in a pop-up window where I can set the width height etc? At the moment all I have been able is to specify a new page, and not a popup. The results are on an external page, the form looks something like:

    Code:
     <form name="form" method="post" action="http://www.blabla.co.uk/external.asp" target="_blank">
    <div><label>Day of Arrival</label>
    <select name="$DAY$">
    <option selected>  01</option>
    <option>02</option>
    <option>03</option>
    <option>04</option>
    ...
    <input name="Submit" value="Check Availability" type="submit">
    </label></div>
    </form>
    Where would I mention the link to a js or something similar to set the pop up?

    Thanks,

    Konrad

  2. #2
    Trash Boat mkoenig's Avatar
    Join Date
    Aug 2007
    Posts
    1,232
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Assuming you posted it you could pull the variables with asp code. It looks like its posting to asp ?

    I know in PHP you could just do a simple.

    <? echo $term; ?>

    $term being the name of the text box from the previous form.

    Im sure you could do the same with ASP

  3. #3
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Something like this should work:
    Code:
    <form  name="form" method="post" action="http://www.blabla.co.uk/external.asp" onclick="window.open('about:blank', 'resultsPage', 'height=300,width=300');" target="resultsPage">

  4. #4
    SitePoint Addict sparkdigital's Avatar
    Join Date
    Feb 2005
    Location
    Kendal, Cumbria - The Lake District, UK
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your replies. I've tried placing the code in the top section:

    HTML Code:
    <form name="form" method="post" action="http://www.blabla.co.uk/external.asp" onclick="window.open('about:blank', 'resultsPage', 'height=300,width=300');" target="resultsPage">
    In this scenario it opens a blank pop-up when clicking on any of the drop down boxes, so no good...

    When placed in the bottom section like this:

    HTML Code:
    <input name="Submit" value="Check Availability" type="submit" onclick="window.open('about:blank', 'resultsPage', 'height=300,width=300');" target="resultsPage">
    In this scenario it does open the pop-up when clicking on the submit button but this is blank and the actual results appear on the original page.

    Am I doing something wrong or missing something?

    Thanks again,

    Konrad

  5. #5
    SitePoint Wizard
    Join Date
    Nov 2004
    Location
    Nelson BC
    Posts
    2,310
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, my code is bad..

    It says onclick but it should be onsubmit
    Code:
    <form  name="form" method="post" action="http://www.blabla.co.uk/external.asp" onsubmit="window.open('about:blank', 'resultsPage', 'height=300,width=300');" target="resultsPage">

  6. #6
    SitePoint Addict sparkdigital's Avatar
    Join Date
    Feb 2005
    Location
    Kendal, Cumbria - The Lake District, UK
    Posts
    249
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, that did the trick!

    Much appreciated,

    Konrad


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
  •