ASP Link query...

Discussion in 'ASP General' started by David, Jun 28, 2004.

  1. David

    David Guest

    Hi,

    Quick question.

    I have the following link:

    <A HREF=""Schedule.asp?JobNumber=" & RS("JobNumber") & "&PONumber=" &
    RS("PONumber") & """>" & RS("JobNumber") ONCLICK= popup() & "</a>


    I want the link to reference a function in the <Script> tag as
    follows:

    <script>

    function popup() {
    window.open( "Schedule.asp" , ""
    ,"top=40,left=40,width=200,height=100" ) ;
    }

    </script>

    I am not sure where to place the ONCLICK code in the hyperlink as this
    link is written out via response.write......Its all the " " & ' ' that
    get me ...

    Thanks in advance


    David
    David, Jun 28, 2004
    #1
    1. Advertising

  2. If you want the popup to happen when the page displays, call popup in the
    <body> tag. You can either load the script with ASP or the body tag. If you
    load the body tag, you will have to make the function accept the vars as
    params.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ************************************************
    Think Outside the Box!
    ************************************************
    "David" <> wrote in message
    news:...
    > Hi,
    >
    > Quick question.
    >
    > I have the following link:
    >
    > <A HREF=""Schedule.asp?JobNumber=" & RS("JobNumber") & "&PONumber=" &
    > RS("PONumber") & """>" & RS("JobNumber") ONCLICK= popup() & "</a>
    >
    >
    > I want the link to reference a function in the <Script> tag as
    > follows:
    >
    > <script>
    >
    > function popup() {
    > window.open( "Schedule.asp" , ""
    > ,"top=40,left=40,width=200,height=100" ) ;
    > }
    >
    > </script>
    >
    > I am not sure where to place the ONCLICK code in the hyperlink as this
    > link is written out via response.write......Its all the " " & ' ' that
    > get me ...
    >
    > Thanks in advance
    >
    >
    > David
    Cowboy \(Gregory A. Beamer\) [MVP], Jun 28, 2004
    #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. Kevin Spencer

    Re: Link Link Link DANGER WILL ROBINSON!!!

    Kevin Spencer, May 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    794
    Kevin Spencer
    May 17, 2005
  2. Learner
    Replies:
    1
    Views:
    973
    Marina Levit [MVP]
    Jan 30, 2006
  3. Anonymous
    Replies:
    0
    Views:
    1,439
    Anonymous
    Oct 13, 2005
  4. Eric Nelson
    Replies:
    5
    Views:
    1,504
    Alexey Smirnov
    Feb 4, 2009
  5. Roland Hall

    ASP LIKE query using parameterized query

    Roland Hall, Jan 12, 2007, in forum: ASP General
    Replies:
    8
    Views:
    206
    Roland Hall
    Jan 13, 2007
Loading...

Share This Page