The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Using Javascript to pass values between browsers
markricard
post May 16 2007, 09:04 AM
Post #1





Group: Members
Posts: 1
Joined: 16-May 07
Member No.: 2,830



Hello,

We have two different web applications, AppA and AppB. Each web application is hosted on different servers.

AppA does a popup to launch AppB in a browser. The user selects items in AppB and puts them in a cart and then we want to transfer those values back to AppA without AppA having to refresh the screen.

We thought we could do this by having AppB do a form post that launches yet another popup whose sole job was to do a javascript parent->parent->field update and pass in the selected textual values.

This works in IE, but it does not work in Firefox or other browsers because we are getting a security exception.

Does anyone know of a way around this or another approach to doing this that will allow us to satisfy this requirement?

Thanks in advance,
Mark
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post May 16 2007, 01:24 PM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



More concrete details would help. What do you mean by AppA "not having to refresh the screen"? I fancy you are trying to think of this as different "application" running in different windows - this is not really how the web works.

Suppose AppA is a shop, and AppB is a (separate) cart mechanism, then if the user puts stuff in a cart in AppB, then clicks - what? "Go to checkout" perhaps? Then the checkout page should normally appear somewhere, to give feedback to the user.

If you really want a separate window to pass information silently to the original server, simply have it post to some page, with the parameters (including a session id, or you won't know whose parameters they are). The page should display whatever is necessary.

I think your proposed javascript window-to-window cross-scripting scheme will fall foul of security problems in any well-designed system, which is probably why it works ok in M$-Exploder.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 08:09 PM