Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Services (http://www.velocityreviews.com/forums/f64-asp-net-web-services.html)
-   -   Need to invoke Javascript from a Web Service (http://www.velocityreviews.com/forums/t787386-need-to-invoke-javascript-from-a-web-service.html)

Ram 12-13-2007 07:33 AM

Need to invoke Javascript from a Web Service
 
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

John Saunders [MVP] 12-13-2007 11:30 AM

Re: Need to invoke Javascript from a Web Service
 
"Ram" <ramsamant@gmail.com> wrote in message
news:7ecb729d-24d7-40b3-b164-825fb3da1fd7@e10g2000prf.googlegroups.com...
> 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.

--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer



msgroup 12-13-2007 06:07 PM

Cross-browser instant message and remote JavaScript callback
 
Hi,

See the article for Cross-browser instant message and remote JavaScript
callback at the site
http://www.udaparts.com/document/art...ercallback.htm

This is a solution to your problem.

Thanks.

"Ram" <ramsamant@gmail.com> wrote in message
news:7ecb729d-24d7-40b3-b164-825fb3da1fd7@e10g2000prf.googlegroups.com...
> 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




Ram 12-14-2007 05:13 AM

Re: Cross-browser instant message and remote JavaScript callback
 
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...


All times are GMT. The time now is 09:50 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.