Need to invoke Javascript from a Web Service

R

Ram

Hi, we have a web based system that has the ability to invoke a web
service on an event occurance, such as addition of a new order. We
need to invoke a Javascript based webpage to execute when such an
event occurs.
Web Site Event ...> Web Service --> Invoke another web page (may be
another domain) having Javascript

We tried a variety of options from C# to try and invoke the web page,
but the Javascript does not execute though the called aspx page
executes. We do not have the ability to bypass using the Javascript
functions as that is proprietary to the system we are integrating
with.

Hope this is clear and thanks in advance for any tips.
Ram
 
J

John Saunders [MVP]

Ram said:
Hi, we have a web based system that has the ability to invoke a web
service on an event occurance, such as addition of a new order. We
need to invoke a Javascript based webpage to execute when such an
event occurs.
Web Site Event ...> Web Service --> Invoke another web page (may be
another domain) having Javascript

Why not:

Web Site Event ...> Web Service
...> Invoke another web page

In other words, let the web site deal with web page issues.

Besides, are you saying that you want the web service to _display_ this
other page? It cannot, as it is not producing output to the user's browser.
Instead, it is returning XML (or maybe JSON). The best you could do is to
have the web site return HTML inside of the XML, then have your web page
load that HTML into a new window. But you'd just as well let the web page do
everything and leave the web service out of it.
 
R

Ram

Just to be a bit more clear these are the steps I would like to
accomplish.
Step 1 - Hosted website - can only trigger a web service - So we write
a web service to receive a notification from the hosted website
Step 2 - My web service needs to execute Javascript code which is
proprietary and I have no control of. So I thought of invoking a web
page which will on load execute the said Javascript code. I dont need
anything back from the Javascript code or from the web page that I try
to invoke.

My problem lies here, since there is no web browser or visible context
in which I can invoke this webpage, the javascript does not execute
but the server side code in the called aspx page does.
I tried the following
a.) web browser control in the aspx page
b.) process to run iexplore.exe with the apsx page

with no luck...
 

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,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top