View Full Version : Submitting a form into ThickBox

05-13-2008, 02:12 AM
This is the html to display an iframe from a link into ThickBox (as some of you might know)

<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:

<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"/>

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.

05-13-2008, 03:39 AM
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.

function submit() {
//Form error checking

// Send all vars to cookies

// JS to open the iframe (just call the function to open one)