Invoking javascript function from IHttpHandler

  • Thread starter Thread starter X
  • Start date Start date
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
 
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

Back
Top