use a popup window to display data from an ASP page

B

brian

I have an ASP page (A) that displays data. One of the
columns is a hyperlink that when clicked opens up a new
asp document (B). The B document gets a parameter from
page A and looks up a value in a database to display the
results. no problem. but instead of opening a new asp
page, I would like to open a popup window. Does anyone
have any suggestions. I have found the javascript to open
a popup window, but I don't know how to pass the value
from page A to page B.
 
M

MD Websunlimited

Hi Brian,

Do you need to control the window with the JavaScript? If not, just set a target of _blank in the hyperlink. If you do then, open
the window using an onclick event in the hyperlink. The window that is referenced will be the ASP B

<a href="javascript:window.open('myWin','myASP.asp?param1=value1')" >fp_rs(.....)</a>

--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
Need to add Meta Tags to your web pages NOW with Google Bot controls.
http://www.websunlimited.com/order/Product/MTM2002/mtm2002_help_dir.htm
FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible
 
K

Kevin Spencer

It can be even easier. Just change the "target frame" property of the
original hyperlink to "_blank" - It will open the link in a new window.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
I

inman

I am performing the same thing. Used the code example on Websunlimited and it worked. However when I pass my parameter over to my detail page, it first comes up with "no records returned" in a frameless small window. And then it comes up with my correct detail page in a full sized window

How do I prevent the "no records returned" from creating its own window and keep the detail page in the small window?
 
I

inman

Nevermind, got it fixed. Still had the old HREF in there and I wasn't passing the parameter to the popup.
 
B

Brian

Thanks for the input but I think you had the 2 parameters
reversed. This is what I used.

<A href="javascript:window.open('<% = strURL2 %>')" >

where strURL2
= "http://mickey/ASP/EOMErrors/getErrorInstructions.asp?
ErrCde=" & rs("Error Code")

It works great except now, after it opens the new window,
the old window becomes blank except for the word [Object]
appears in the upper left corner.
-----Original Message-----
Hi Brian,

Do you need to control the window with the JavaScript? If
not, just set a target of _blank in the hyperlink. If you
do then, open
the window using an onclick event in the hyperlink. The
window that is referenced will be the ASP B
<a href="javascript:window.open('myWin','myASP.asp?
param1=value1')" >fp_rs(.....) said:
--
Mike -- FrontPage MVP '97-'02
http://www.websunlimited.com
Need to add Meta Tags to your web pages NOW with Google Bot controls.
http://www.websunlimited.com/order/Product/MTM2002/mtm2002 _help_dir.htm
FrontPage Add-ins Since '97 2003 / 2002 / 2000 Compatible


"brian" <[email protected]> wrote in
message news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top