Pop up utilizing Querystrings

Discussion in 'ASP General' started by Drew, Jul 22, 2005.

  1. Drew

    Drew Guest

    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
     
    Drew, Jul 22, 2005
    #1
    1. Advertising

  2. Drew

    Mark Schupp Guest

    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.

    --
    --Mark Schupp


    "Drew" <> wrote in message
    news:...
    >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
    >
     
    Mark Schupp, Jul 22, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TC
    Replies:
    5
    Views:
    7,811
    =?Utf-8?B?R2lyaXNoS3VtYXI=?=
    Sep 1, 2004
  2. Mokong
    Replies:
    1
    Views:
    382
    Chris Jackson
    Dec 17, 2003
  3. =?Utf-8?B?R2xlbm4=?=

    trouble utilizing intrinsic objects in custom class

    =?Utf-8?B?R2xlbm4=?=, May 19, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    503
    =?Utf-8?B?R2xlbm4=?=
    May 19, 2004
  4. Robert W. Eckert
    Replies:
    4
    Views:
    800
    =?Utf-8?B?Um9iIEVja2VydA==?=
    Oct 5, 2004
  5. Brad Johnson
    Replies:
    0
    Views:
    301
    Brad Johnson
    Jul 30, 2007
Loading...

Share This Page