HighTechTalks DotNet Forums  

Need to invoke Javascript from a Web Service

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss Need to invoke Javascript from a Web Service in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Ram
 
Posts: n/a

Default Need to invoke Javascript from a Web Service - 12-13-2007 , 01:33 AM






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

Reply With Quote
  #2  
Old   
John Saunders [MVP]
 
Posts: n/a

Default Re: Need to invoke Javascript from a Web Service - 12-13-2007 , 05:30 AM






"Ram" <ramsamant (AT) gmail (DOT) com> wrote

Quote:
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




Reply With Quote
  #3  
Old   
msgroup
 
Posts: n/a

Default Cross-browser instant message and remote JavaScript callback - 12-13-2007 , 12:07 PM



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 (AT) gmail (DOT) com> wrote

Quote:
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



Reply With Quote
  #4  
Old   
Ram
 
Posts: n/a

Default Re: Cross-browser instant message and remote JavaScript callback - 12-13-2007 , 11:13 PM



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

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.