Pop up utilizing Querystrings

D

Drew

I need to find out how to incorporate a popup window that passes a
querystring, after some quick research I found that by using JavaScript that
you can pop up a window,

var newwindow;
function poptastic(url)
{
newwindow=window.open(url,'name','height=400,width=200');
if (window.focus) {newwindow.focus()}
}

and using a link like this, you can pop the window,

<%Response.Write("<a
href=""javascript:poptastic('detailPastEvents.asp?RegNo='" &
rsEvents.Fields.Item("RegNo").Value & "');"">past events</a>")%>

My issue is that I need to pass a querystring when opening this page, and I
can't figure out how to make this work. Can anyone help me out?

Thanks,
Drew
 
M

Mark Schupp

You are passing a querystring (?RegNo='" &
rsEvents.Fields.Item("RegNo").Value) but it looks like you are putting
single quote after the "=" which could cause problems. Do a "view source"
and see what you are actually getting. What you want is (from what you have
given):

<a href="javascript:poptastic('detailPastEvents.asp?RegNo=nnnn');">

"nnnn" should be the RegNo value.
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top