aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Cross window scripting. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Cross window scripting." Watch "Cross window scripting." New topic
Author

Cross window scripting.

Anand Loganathan
Greenhorn

Joined: Sep 13, 2003
Posts: 12
I have a scenario like this.
I have a JSP Page. In this page I am displaying some symbol. When I click on this symbol, It will go to another site fetch the values in an array format.

It looks like this.
http://www.abc.com/xyz?SYM1,SYM2

The return type is array of objects.

I need to implement this only in Javascript and no server side manipulation is required.

Some body please help me how I would read the array of objects.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Goto a seperate site. Does that mean another domain that s different than the orginator?

Eric
Anand Loganathan
Greenhorn

Joined: Sep 13, 2003
Posts: 12
Eric,

Your assumption is correct.

Say for an example, my domain is http://test.com
and I am getting the value from http://abc.com , doing some manipulation and displaying the value in http://test.com
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Then with my assumption, you are not going to really be able to talk with or manipulate something from another domain since JavaScript has a same domain policy. It is to protect us from sites snooping on other things they do not have rights to.


Now if the site were to return JSON, then you could link to an external js and have it return an object.

Eric
Anand Loganathan
Greenhorn

Joined: Sep 13, 2003
Posts: 12
Eric,

Could you example for this one or could you give me link where I can get this detail for implementing external JS.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cross window scripting.