Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Newbie HyperLink query

Newbie HyperLink query

Scheduled Pinned Locked Moved ASP.NET
javascriptdatabasequestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mrirvs
    wrote on last edited by
    #1

    I have a HyperLink link in my code that passes a query string to page_load() in my code : link.NavigateUrl = "slideViewer.aspx?picture=" + imageFolder; When slideViewer.aspx opens I would like to open with no menus, toolbars at a specific window size etc. is it possible to call the javascript window.open() from the HyperLink ? I have tried by the host throws an exception. Thanks Paul

    D 1 Reply Last reply
    0
    • M mrirvs

      I have a HyperLink link in my code that passes a query string to page_load() in my code : link.NavigateUrl = "slideViewer.aspx?picture=" + imageFolder; When slideViewer.aspx opens I would like to open with no menus, toolbars at a specific window size etc. is it possible to call the javascript window.open() from the HyperLink ? I have tried by the host throws an exception. Thanks Paul

      D Offline
      D Offline
      Dave Shaw
      wrote on last edited by
      #2

      Hi Paul, Try adding this to the start of your code: <!-- function open_window(url) { var NEW_WIN = null; NEW_WIN = window.open (url, "Page Title", "toolbar=no,"+ "width=500"+ ",height=250"+ ",directories=no,status=no,"+ "scrollbars=yes,resize=no,menubar=no"); //NEW_WIN.location.href = url; } //--> and then using making the server write: [to call it. Thanx! Dave Shaw History admires the wise, but elevates the brave. - Edmund Morris](javascript:open_window('MyPage.aspx?args=values');)

      M 1 Reply Last reply
      0
      • D Dave Shaw

        Hi Paul, Try adding this to the start of your code: <!-- function open_window(url) { var NEW_WIN = null; NEW_WIN = window.open (url, "Page Title", "toolbar=no,"+ "width=500"+ ",height=250"+ ",directories=no,status=no,"+ "scrollbars=yes,resize=no,menubar=no"); //NEW_WIN.location.href = url; } //--> and then using making the server write: [to call it. Thanx! Dave Shaw History admires the wise, but elevates the brave. - Edmund Morris](javascript:open_window('MyPage.aspx?args=values');)

        M Offline
        M Offline
        mrirvs
        wrote on last edited by
        #3

        Thanks Dave. I am still having a little trouble. I have included the Javascript in a file called images.aspx and the following code is in images.aspx.cs: private HyperLink getNewHyperLink(string thumbPath,string imageFolder) { HyperLink link = new HyperLink(); link.ImageUrl = thumbPath; string URL = "slideViewer.aspx?picture=" + imageFolder; string linkStr = ""; link.NavigateUrl = linkStr; link.Target = "_blank"; return link; } I get page NOT found when I click the hyperlink. Sorry if I seem dumb, but I AM very new to this. Paul -- modified at 17:25 Saturday 3rd September, 2005

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups