Hyperlink to open popup window?

Discussion in 'ASP .Net' started by Olav Tollefsen, Jan 21, 2004.

  1. I have an <asp:Hyperlink> in my .aspx file.

    How can I configure it to open the URL (NavigateURL) in a popup window
    instead of a new normal browser window. I use Target="_blank", but didn't
    find other values to specify a popup window.

    Olav
    Olav Tollefsen, Jan 21, 2004
    #1
    1. Advertising

  2. One way is to use the target as you mentioned. You can also open a new
    window using the JavaScript window.open() method, which gives you more
    control over the properties of the window. If you want a hyperlink to
    activate the JavaScript, you would use a URL as follows:

    <a href="javascript:window.open('http://www.takempis.com')">Link Text</a>

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

    "Olav Tollefsen" <> wrote in message
    news:uboVE#...
    > I have an <asp:Hyperlink> in my .aspx file.
    >
    > How can I configure it to open the URL (NavigateURL) in a popup window
    > instead of a new normal browser window. I use Target="_blank", but didn't
    > find other values to specify a popup window.
    >
    > Olav
    >
    >
    Kevin Spencer, Jan 21, 2004
    #2
    1. Advertising

  3. "Kevin Spencer" <> wrote in message
    news:...
    > One way is to use the target as you mentioned. You can also open a new
    > window using the JavaScript window.open() method, which gives you more
    > control over the properties of the window. If you want a hyperlink to
    > activate the JavaScript, you would use a URL as follows:
    >
    > <a href="javascript:window.open('http://www.takempis.com')">Link Text</a>


    But, how do I get rid of the toolbar and address field stuff. I only want a
    basic browser window to display some content.

    Olav
    Olav Tollefsen, Jan 21, 2004
    #3
  4. > But, how do I get rid of the toolbar and address field stuff. I only want
    a
    > basic browser window to display some content.


    See
    http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp

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

    "Olav Tollefsen" <> wrote in message
    news:#...
    > "Kevin Spencer" <> wrote in message
    > news:...
    > > One way is to use the target as you mentioned. You can also open a new
    > > window using the JavaScript window.open() method, which gives you more
    > > control over the properties of the window. If you want a hyperlink to
    > > activate the JavaScript, you would use a URL as follows:
    > >
    > > <a href="javascript:window.open('http://www.takempis.com')">Link

    Text</a>
    >
    > But, how do I get rid of the toolbar and address field stuff. I only want

    a
    > basic browser window to display some content.
    >
    > Olav
    >
    >
    Kevin Spencer, Jan 21, 2004
    #4
  5. "Kevin Spencer" <> wrote in message
    news:#...
    > > But, how do I get rid of the toolbar and address field stuff. I only

    want
    > a
    > > basic browser window to display some content.

    >
    > See
    >

    http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp

    Thanks, do you have a hint to get the syntax correct when using it with a
    DataSet:

    <asp:HyperLink id=Hyperlink3 ForeColor="#555BAE"
    NavigateUrl="javascript:window.open('<%# DataBinder.Eval(Container.DataItem,
    "PhotoId", "DisplayPhoto.aspx?PhotoId={0}") %>')"
    Runat="server'>L3_5</asp:HyperLink>

    I get an error message "The server tag is not well formed".

    How do I get the quotes right?

    Olav
    Olav Tollefsen, Jan 21, 2004
    #5
    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. moondaddy
    Replies:
    2
    Views:
    602
    moondaddy
    Jul 27, 2004
  2. Jens Peter Hansen
    Replies:
    7
    Views:
    499
    Randy Webb
    Jun 19, 2004
  3. Raffi
    Replies:
    4
    Views:
    203
    Dr John Stockton
    Aug 12, 2004
  4. Berlin  Brown

    Selection; open popup or open a new window

    Berlin Brown, Jun 26, 2006, in forum: Javascript
    Replies:
    0
    Views:
    108
    Berlin Brown
    Jun 26, 2006
  5. Jimmy
    Replies:
    1
    Views:
    312
    Thomas 'PointedEars' Lahn
    Oct 6, 2007
Loading...

Share This Page