Invoking javascript function from IHttpHandler

X

X

I am trying to invoke a javascript function from IHttpHandler using
Context.Response.Write. The function is present in .js file and is not
being invoked. The following snippet is called from ProcessRequest
method of the IHttpHandler.

Code snippet:
context.Response.Write("<script>window.parent.frames[1].location='../Update.htm';</script>");
context.Response.Write("<script language='javascript'>\r\n");
context.Response.Write(string.Format("UpdateNode('{0}', '{1}',
'true');", _retVal, Id));
context.Response.Write("</script>");

Thanks
 
K

Karl Seguin [MVP]

You don't need to do anything special.

It should be working.

How is the .js file being included? Are you doing a
context.Response.Write("<script src=........"); ??

Is the javascript below being outputted BEFORE the .js file?

Karl
 

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
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top