473,408 Members | 2,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Invoking javascript function from IHttpHandler

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.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

Oct 19 '06 #1
1 1848
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" <de*******@gmail.comwrote in message
news:11*********************@f16g2000cwb.googlegro 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

Oct 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: lapin | last post by:
I'm trying to get access to session variables from an IHttpHandler class. In several places I've seen the solution posted as in this message: >If you define your own custom HttpHandler, you need...
1
by: lapin | last post by:
I'm trying to get access to session variables from an IHttpHandler class. In several places I've seen the solution posted as in this message: >If you define your own custom HttpHandler, you...
2
by: JCE | last post by:
I need to programmatically invoke an asp:Button click event from a javascript function. The page containing the script and the button is the HTML page associated with a WebUserControl-derived...
5
by: vimakefile | last post by:
I'd like to have the concept of a Page (different code-behind file for each url, session state, etc.) but be able to specify my own custom HTTP payload. (I don't want to use any Asp.Net forms,...
0
by: Stu | last post by:
Hi, I am trying to write a basic httphandler to 'fake' that pages actually exist. I have copied the code below from various sites - but the line 'Implements IHttpHandler' reports an error "type...
1
by: Aartware | last post by:
I've read all the items about the IHttpHandler and the session-object and I see nothing wrong with my code, but still I have no session object. This is my code: Imports System Imports...
3
by: Matthew Lock | last post by:
Hello, I am automating Internet Explorer in order to do some simple automated testing of a web application. How do I invoke Javascript functions in the web page I load? I can successfully start...
0
by: Mike Gleason jr Couturier | last post by:
Hi, we would like to include a JavaScript library to an existing site... we thought that maybe a IHttpHandler would be easy to configure in a new site. In the ProcessRequest function, is it...
0
by: everlast88az | last post by:
I have created an active x web browser axWebBrowser1. I navigate to the url through: axWebBrowser1.Navigate(URL, ref Zero, ref EmptyString, ref EmptyString, ref EmptyString); ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.