javascript:window.open, won't
-
I am having an intermittent problem showing a new window with javascript. When a user clicks a linkbutton on my page, it should show BalanceReport.aspx with the accompanying parameters, instead it does nothing. It always works on my system (naturally), it usually works on another users' system, and it never works on yet another users' system. In the Page_Load event I do some database stored procedure calls and fill a stringbuilder with HTML that is sent to the page. That seems to work. Javascript is enabled on our browsers (IE6 xpSp2). I am unsure where to look next. In page_load: const string cOnClientClickReportTemplate = "javascript:window.open('BalanceReport.aspx?CompPK={0}',"; const string cReportDialogArgs = "'newWindow','width=800,height=800,resizable=yes, menubar=yes,toolbar=yes');return false;"; lbtnReport.OnClientClick = String.Format(cOnClientClickReportTemplate, ViewState["CompPK"].ToString()) + cReportDialogArgs; Any ideas? Thanks.
Someone's gotta be the last to know, but why is it always me?
-
I am having an intermittent problem showing a new window with javascript. When a user clicks a linkbutton on my page, it should show BalanceReport.aspx with the accompanying parameters, instead it does nothing. It always works on my system (naturally), it usually works on another users' system, and it never works on yet another users' system. In the Page_Load event I do some database stored procedure calls and fill a stringbuilder with HTML that is sent to the page. That seems to work. Javascript is enabled on our browsers (IE6 xpSp2). I am unsure where to look next. In page_load: const string cOnClientClickReportTemplate = "javascript:window.open('BalanceReport.aspx?CompPK={0}',"; const string cReportDialogArgs = "'newWindow','width=800,height=800,resizable=yes, menubar=yes,toolbar=yes');return false;"; lbtnReport.OnClientClick = String.Format(cOnClientClickReportTemplate, ViewState["CompPK"].ToString()) + cReportDialogArgs; Any ideas? Thanks.
Someone's gotta be the last to know, but why is it always me?
-
Your question has nothing to do with ASP.NET. Javascript questions should be posted in the Web Development forum.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
Well, the problem is occurring on an ASP.NET page, so.... :|
Someone's gotta be the last to know, but why is it always me?
-
Well, the problem is occurring on an ASP.NET page, so.... :|
Someone's gotta be the last to know, but why is it always me?
goodideadave wrote:
Well, the problem is occurring on an ASP.NET page, so....
So what? That doesn't make it an ASP.NET question. The fact that you are using Javascript in conjunction with ASP.NET is irrelevent. Your question is Javascript-specific, it belongs in the Web Development forum.
Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush
-
Well, the problem is occurring on an ASP.NET page, so.... :|
Someone's gotta be the last to know, but why is it always me?
goodideadave wrote:
Well, the problem is occurring on an ASP.NET page, so....
Are you doing this professionally? Then perhaps the "Work and Training Issues" would be a good forum? Is this occuring on a computer? Perhaps the "Hardware / Device Drivers" forum would fit? ;)
Despite everything, the person most likely to be fooling you next is yourself.
-
Well, the problem is occurring on an ASP.NET page, so.... :|
Someone's gotta be the last to know, but why is it always me?
So, I guess you need to do a little bit of reading to understand where the line is, what ASP.NET is, what it does, and what questions are generic to all web apps (hint: ones that relate to javascript, css and HTML )
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
So, I guess you need to do a little bit of reading to understand where the line is, what ASP.NET is, what it does, and what questions are generic to all web apps (hint: ones that relate to javascript, css and HTML )
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
Clearly I have erred. Thank you so very much for pointing me in the right direction.
Someone's gotta be the last to know, but why is it always me?