Hi All,
I have used the following code to open a pop up window from Infragistics UltrGrid using HyperLink
<asp:HyperLinkID="HyperLink1"Text='<%# Eval("EID") %>'NavigateUrl="javascript:window.open('<%# "EIDetails.aspx?EID="+DataBinder.Eval(Container.DataItem,"EID") %>','popWindow','height=500,resizable=yes,width=500')"runat="server"></asp:HyperLink>
I got an error that server tag is not formed.How do we resolve this?
1) I think the 'EIDetails.aspx?EID=' part should be outside of the binding syntax;
2) The quoting inside quoting need to be escaped by double quoting, i.e.,
"javascript:window.open('EIDetails.aspx?EID=<%# Eval(""EID"") %>','popWindow','height=500,resizable=yes,width=500')"
Hope this helps.
Try this
<asp:HyperLink ID="HyperLink1" Text='<%# Eval("EID") %>' NavigateUrl='javascript:window.open("<%# "EIDetails.aspx?EID="+DataBinder.Eval(Container.DataItem,"EID") %>","popWindow","height=500,resizable=yes,width=500")' runat="server"></asp:HyperLink>
Thanks for the reply.Cannot open the popup window.character expected '(' error
Have you tried this?
<asp:HyperLinkID="HyperLink1"Text='<%# Eval("EID") %>'NavigateUrl="javascript:window.open('EIDetails.aspx?EID=<%# Eval(""EID"") %>','popWindow','height=500,resizable=yes,width=500')"runat="server"></asp:HyperLink>
Hi sfeng,
I tried that.still Iam getting the same error.server tag is not well formed.
Hi All,
Thanks all. I got the solution
http://forums.asp.net/p/206006/206054.aspx
Thanks dg_pp. For anyone interested, here are two working examples:
<asp:HyperLinkID="HyperLink1"Text='<%# Eval("EID") %>'NavigateUrl=<%# Eval("EID", "javascript:window.open('EIDetails.aspx?EID={0}','popWindow','height=500,resizable=yes,width=500')")%>runat="server"></asp:HyperLink>
<asp:HyperLinkid="HyperLink2"Runat="server"NavigateUrl= <%#"javascript:my_window=window.open('Resim.aspx?RID=" + Eval("RID") + "','my_window','width=300,height=300');my_window.focus()" %>text='BLAH'></asp:HyperLink>
hi,
i am opening a new pop window inside the infragistic Grid Version=6.1.20061.1076.when It opens it minimizes automatically.
<atitle="Click to View Details"href='Javascript:showWindow();'>
<b>
<%# Container.Text %></b></a>
What may be the Problem.Can anyone tell me.
Thanks and Regards,
Uday
Hello everyone,
I'm hoping you can help me out. I'm using the script that has been discussed here, but when i click the asp:hyperlink control, the window pops up with the right dimensions, etc., but then my page that contains the hyperlink control posts back and displays [object Window]. So it is no longer displaying my original page, just the pop up window with a blank page underneath.
Here's the html that i have...
<asp:HyperLinkID="lnkText"runat="server" NavigateUrl="javascript:window.open('http://www.somesite.com/help.cfm','popWindow','height=280','window=380')"/>Any ideas on why this is happening? Your help would be greatly appreciated!
Rewrite as
<asp:HyperLinkID="lnkText"runat="server" NavigateUrl="#" onclick="javascript:window.open('http://www.somesite.com/help.cfm','popWindow','height=280','window=380');return false;"/>
Thank you for the reply...but it's still not working properly. Now the pop up doesn't happen, it just says "Untitled" in the title bar...
Ok...actually, i fixed it. The only thing I had to do was add the onclick attribute with the script information. Thanks for the help, it's much appreciated!
0 comments:
Post a Comment