Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Invoking javascript function from IHttpHandler

Reply
Thread Tools

Invoking javascript function from IHttpHandler

 
 
X
Guest
Posts: n/a
 
      10-19-2006
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.fram es[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

 
Reply With Quote
 
 
 
 
Karl Seguin [MVP]
Guest
Posts: n/a
 
      10-19-2006
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
--
http://www.openmymind.net/
http://www.fuelindustries.com/


"X" <> wrote in message
news: ups.com...
>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.fram es[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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IHttpHandler to inject JavaScript? Mike Gleason jr Couturier ASP .Net 0 09-24-2008 01:34 PM
Invoking c function in a c plus plus function... Rahul C++ 9 03-25-2008 05:24 PM
JavaScript: conditionally invoking functions within a function Spartanicus HTML 3 09-30-2005 03:35 PM
Problems implementing IHttpHandler lapin ASP .Net 1 11-19-2003 04:46 PM
Null Session values in IHttpHandler lapin ASP .Net 0 11-18-2003 07:21 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57