f



How to send javascript object from one page to another page?

Assume i have javascript object called "call" and i have stored some values in it and i want to access the same object "call" not values. This type of approach is it possible?

If yes plese explain with simple example.

I know there are several ways we can send the object properties values from one page to another page by using post url, header, cookies so on but my requirment to access the whole object instanse form one page to another page.

Anything in this regard highly appreciated. Thanks in advance.
0
Girish
1/31/2014 6:52:09 AM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

3 Replies
921 Views

Similar Articles

[PageSpeed] 18

Girish Kaltippi <girish.kaltippi@gmail.com> wrote on 31 jan 2014 in
comp.lang.javascript: 

> Assume i have javascript object called "call" and i have stored some
> values in it and i want to access the same object "call" not values.
> This type of approach is it possible? 
> 
> If yes plese explain with simple example.
> 
> I know there are several ways we can send the object properties values
> from one page to another page by using post url, header, cookies so on
> but my requirment to access the whole object instanse form one page to
> another page. 

Well that is a nicely put question in your exam, then we should share in the 
honours. 

Especially the assuming bit makes this a clear examination Q, 
in this NG we are more into real world scripting problems.

> Anything in this regard highly appreciated.

I imagine so.

> Thanks in advance.

Indeed?

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
0
Evertjan
1/31/2014 11:06:07 AM
On Thu, 30 Jan 2014 22:52:09 -0800 (PST), Girish Kaltippi wrote:
> Assume i have javascript object called "call" and i have stored some values in it and i want to access the same object "call" not values. This type of approach is it possible?
> 
> If yes plese explain with simple example.
> 
> I know there are several ways we can send the object properties values from one page to another page by using post url, header, cookies so on but my requirment to access the whole object instanse form one page to another page.
> 
> Anything in this regard highly appreciated. Thanks in advance.

Use AJAX to retrieve the new page, and replace the current page with it.
That should keep the object instances intact, details aside.
The new page should be able to access them.
0
JJ
1/31/2014 3:53:37 PM
On Thu, 30 Jan 2014 22:52:09 -0800, Girish Kaltippi wrote:

> Assume i have javascript object called "call" and i have stored some
> values in it and i want to access the same object "call" not values.
> This type of approach is it possible?
> 
> If yes plese explain with simple example.
> 
> I know there are several ways we can send the object properties values
> from one page to another page by using post url, header, cookies so on
> but my requirment to access the whole object instanse form one page to
> another page.
> 
> Anything in this regard highly appreciated. Thanks in advance.

When I needed to do this once, a long time ago, when i was coding a 
shopping cart application that was solely javascript in the client side, 
I solved this issue by using a frame, loading the pages I wanted to 
display into the frame, and keeping the shopping cart in the page that 
enclosed the frame.

This only works if the document inside the frame comes from the same 
domain as the parent document containing the frame, otherwise you hit a 
cross site scripting issue.

-- 
Denis McMahon, denismfmcmahon@gmail.com
0
Denis
1/31/2014 6:52:49 PM
Reply: