SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Nov 26, 2003, 09:16 #1
- Join Date
- Jun 2002
- Location
- Riding the electron wave
- Posts
- 372
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
"[Object Window]" in parent browser
I have created a pop-up form that a user can use to find info on some of our products. The pop-up form is done with php, but the pop-up window is created using a simple javascript.
Code:<a href="javascript:window.open('foo.php', null, 'width=250,height=325')" alt="Foo">.....</a>
Ducharme's Axiom: "If you view your problem closely
enough, you will recognize yourself as part of the problem."
-
Nov 26, 2003, 10:21 #2
- Join Date
- Dec 2002
- Location
- Alabama, USA
- Posts
- 2,560
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
When the A element is clicked its default behavior is to load the value of the href attribute - assuming it is a URL. window.open returns a reference to a window object - this becomes the href value. Try this...
Code:<a href='foo.php' onclick="window.open(this.href, null, 'width=250,height=325'); return false;" alt="Foo">.....</a>
Cross-Browser.com, Home of the X Library
-
Nov 26, 2003, 10:35 #3
- Join Date
- Jun 2002
- Location
- Riding the electron wave
- Posts
- 372
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks a bunch, MikeFoster! That worked great.
I didn't know that about the "<a>" element. Good bit of info to file away for next time.Ducharme's Axiom: "If you view your problem closely
enough, you will recognize yourself as part of the problem."
Bookmarks