Running Javascript with Ajax

W

Wannabe

I have a page that has the following Javascript on it:

Page.ClientScript.RegisterStartupScript(typeof(string), "OpenWindow",
"<script langauge='javascript'>OpenNewWindow('MyPage.aspx', '" + queryString
+ "', 'anotherName');</script>");

I was asked to add Ajax to the grid so it would load faster. Trouble is when
I did that, it broke the above line of code. When a user selects an item in
the grid, it should open a new window with the information from the row they
clicked. I verified that the code is being hit, but the javascript does not
run. Can anyone tell me how I can get the javascript to run with it being in
an Ajax update panel?
 
W

Wannabe

I found out that I needed to be using ScriptManager.RegisterStartupScript,
then it worked as before.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top