• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Accessing JavaScript Function of another Web-Application

 
Ranch Hand
Posts: 120
Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want Call a client side method of an Webapplication from outside that application,
Lets say from my application or script, so as to trigger the functionality of that web-application.

I think as we are accessing only client side JS, so we could call the method.

Is it possible? If yes then what should be the approch for the same? Thank you in Advance. :-)
 
Greenhorn
Posts: 9
Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello sandeep,

In order to call a method outside the application, you have to provide one of the following:

- Webservice;
- RMI server; or
- Sockets server.

In every case, you should implement code in your web application to allow other proccess to comunicate with it and access its methods.
The closer to what you need is RMI, that literally allows you to invoke remote methods, but it will need that both sides to maintain an Interface of which methods may be called.

Please take a look on that.

Micael
 
Sheriff
Posts: 67756
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Micael Carvalho wrote:In order to call a method outside the application, you have to provide one of the following:


None of that is applicable to client-side JavaScript.

And no, you cannot call the JavaScript of another page that was not served from your own domain.
reply
    Bookmark Topic Watch Topic
  • New Topic