deepa

deepa

  • NA
  • 42
  • 0

Open a popup window on hyperlink click

May 15 2007 6:52 AM
Hi,
In my application,i have a table with one of its column of 'hyperlink' type. On click of that data i need to open a popup window..i have written folowing code for the same:

<asp:HyperLinkField NavigateUrl="javascript:JobDetails()" DataTextField="JOB_ID" HeaderText="JOB ID" SortExpression="JOB_ID"/>

and the javascript code is:

<script language="Javascript" type="text/javascript">

    function JobDetails()
    {
        ChildWindow = window.open('frmJobDetails.aspx', 'Job Details', 'width=200,height=200,top=400,left=600,toolbars=no,scrollbars=no,status=no,resizable=no,titlebar=no');
    }
   </script>

My problem is that when i cntrl+click on the 'NavigateUrl' attribute of HyperLinkField, it says page cannot be displayed. Kindly do tell me what is wrong...or some other way of showing popup...me new to asp.net, so please explain how to do it...

Thanks

Answers (1)