Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Popup Search Form needing to post to an IFRAME

Status
Not open for further replies.

okiiyama

IS-IT--Management
Jan 3, 2003
269
US
I've got a page (lets call it mainpage) that will have a search link. Clicking on that link will create a popup (lets call this popup) popup will be a search criteria form. AFter filling in the criteria, pressing "go" will post the form to an iframe on mainpage.

Is this possible, and is there any difference between using <a href=....></a> and window.open(...)for the popup?
Is one better than the other?

Thanks for the Help.
 

First - yes it is possible in the first instance. Regarding the use of <a href ></a> and window.open() -- I would say not... they are equal. They are both equally valid.

Jeff

 

As Jeff says, it is possible, however, I would say that using window.open has both pros and cons:

pros:
It is easier to close the popup window, and access its DOM, should you need to.

cons:
The popup could be blocked.

Consider having the criteria form on the search page, but with the ability to show/hide it (like clicking the + sign next to a foldername in explorer, etc).

Hope this helps,
Dan




[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
As for how to do it: make sure you give your iframe a "name", and then just use that name in the "target" parameter of the form tag in the popup. I was surprised that it's that easy.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top