JS\Hyperlink

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • gh

    JS\Hyperlink

    I am using .net v 1.1. I use the code below to dynamically create a
    cell with a hyperlink and assign the link information. When I click on
    a link the window.open doesn' t fire. What am I missing?

    cell.Width = "300";
    string aID = ds.Tables[0].Rows[J]["ID"].ToString();
    HyperLink aLink = new HyperLink();
    aLink.CssClass = "directory" ;
    aLink.ID = "HyperLink"+Con vert.ToString(J );
    aLink.Text = ds.Tables[0].Rows[J]["CONAME"].ToString();
    aLink.NavigateU rl = "javascript :;";
    aLink.Attribute s.Add("onclick" ,
    "window.open('m embercard.aspx? ID="+aID+"','ne w'," +
    "'height=27 5, width=600, status= no,resizable= no, scrollbars=no,
    toolbar=no, menubar=no');") ;


    TIA
  • Fernando Rodriguez

    #2
    Re: JS\Hyperlink

    Please post the HTML produced by your code.
    Just load it, then right-click on the page and select View Source. Post the
    code for the whole page as this is often caused by an error somewhere else
    on the page, such as an unclosed or self-closed <scripttag.

    "gh" <gh@att.netwrot e in message
    news:Omxbu0IqIH A.1772@TK2MSFTN GP03.phx.gbl...
    >I am using .net v 1.1. I use the code below to dynamically create a cell
    >with a hyperlink and assign the link information. When I click on a link
    >the window.open doesn' t fire. What am I missing?
    >
    cell.Width = "300";
    string aID = ds.Tables[0].Rows[J]["ID"].ToString();
    HyperLink aLink = new HyperLink();
    aLink.CssClass = "directory" ;
    aLink.ID = "HyperLink"+Con vert.ToString(J );
    aLink.Text = ds.Tables[0].Rows[J]["CONAME"].ToString();
    aLink.NavigateU rl = "javascript :;";
    aLink.Attribute s.Add("onclick" ,
    "window.open('m embercard.aspx? ID="+aID+"','ne w'," +
    "'height=27 5, width=600, status= no,resizable= no, scrollbars=no,
    toolbar=no, menubar=no');") ;
    >
    >
    TIA

    Comment

    Working...