javascript not working

Posted by Gopal_nivas under ASP.NET on 9/1/2010 | Points: 10 | Views : 1387 | Status : [Member] | Replies : 3
hi..

in c#..
linkbutton_click

string popup22 = "<script language='javascript'>" + "window.open('http://localhost:1133/webfiles/management.aspx?username=" + username + "','PopUp11')" + "</script>";

ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "Popup11", popup22, false);


this statement is working fine in "IE browser"..

but if i run the application in other browsers means its not working(except IE)..

how to do this..

need ur suggestions with example..

regards
gopal.s




Responses

Posted by: Laghaterohan on: 9/1/2010 [Member] Starter | Points: 25

Up
0
Down
Well you can try this:

Instead of ScriptManager.Register.......

Use,

Page.ClientScript.RegisterClientScriptBlock(.......)

Thank You,
Rohan Laghate


Best Regards,
Rohan Laghate

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gopal_nivas on: 9/1/2010 [Member] Starter | Points: 25

Up
0
Down
hi lag..

tat too not working ...

need ur suggestions..

how to tackle this..

regards
gopal.s

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Laghaterohan on: 9/1/2010 [Member] Starter | Points: 25

Up
0
Down
Hi Gopal,

Try this :

string popup22 = "<script>";
popup22 += "alert('Hi');"; // write your window.open statement here...
popup22 += "</script>";
Page.ClientScript.RegisterClientScriptBlock(typeof(YourPage name), "popup22 ", popup22 );


Also make sure that u have no update panel on that page...which may cause the trouble. Also, keep the proper check of ';' while writing the code.

Thank You,
Rohan

Best Regards,
Rohan Laghate

Gopal_nivas, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response