Click here to Skip to main content
14,699,891 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi Guys,
I need to Pass Eval value to script for Popup window..
i using following code..
<script language="JavaScript"type="text/javascript">
       function openNewWindow(Path) {
           alert("HI");
           try {
             
                   var width = 400;
                   var height = 430;
                   var left = parseInt((screen.availWidth / 2) - (width / 2));
                   var top = parseInt((screen.availHeight / 2) - (height / 2));
                   var windowFeatures = "width=" + width + ",height=" + height + ",status,resizable,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
                   window.open(Path, "_Blank", windowFeatures)
             
           }
           catch (e) {
               return false;
           }
           return false;
       }
</script>  

 <asp:TemplateField>
 <itemtemplate> 
 <a href="java<!-- no -->script:void(0);" önclick="return openNewWindow('../Preview.aspx','<%#Eval(" nodeguid=") %>');"  runat="server">
 </a> </itemtemplate>
Posted
Updated 18-Sep-12 5:42am
v3
Comments
ZurdoDev 18-Sep-12 10:47am
   
Use the querystring.
Joan M 18-Sep-12 10:56am
   
Wonderful! and is it working properly? Do you have any problem? Could you please be a little bit more specific?

1 solution

Change your code as :

OnClientClick='<%# Eval("nodeguid=", "return openNewWindow(\"{0}\");") %>'
   
v2
Comments
sathisyas 20-Sep-12 5:49am
   
even i am getting Problem i need to any changes in script/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900