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

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top