Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Apr 2006
    Posts
    231
    Thanks
    9
    Thanked 1 Time in 1 Post

    Submitting a form into ThickBox

    This is the html to display an iframe from a link into ThickBox (as some of you might know)
    Code:
    <a href="ajax.PHP?keepThis=true&TB_iframe=true&height=250&width=400" title="add a caption to title attribute / or leave blank" class="thickbox">Example 1</a>
    Heres my form:
    Code:
    <form action="search.php" method="GET" id="sff" name="sff">
    	<input type="text" name="sf" id="sf" value=""/>
    	<input type="submit" id="go" value="search"/>
    </form>
    I want to display the results of a submited form in this iframe, however. This means that the values of the input (sf) have to be passed down. If the form is submitted into the iframe and the iframe opens, I can handle it from there.

  • #2
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    well I don't know of a way to do this easily. (I looked for awhile then found a less stressful solution).
    You can submit your from using a JS function, so before submitting, you save the values to cookies. Then have the frame open and load the cookies.
    Code:
    function submit() {
    //Form error checking
    
    // Send all vars to cookies
    
    // JS to open the iframe (just call the function to open one)
    }

    -Adam
    Why not thank me?

    http://adamsworld.name


  •  

    Posting Permissions

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