Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Javascript HTML jQuery
Hi,
 
I have an application where I am storing some values in javascript array and display the values in a table on html page. I have another html page where I need the same values so that I am trying to use the same array object to display the values but I am not sure is there any way to pass array object from one js to another js.
I also tried doing the same with local storage but the problem is same since local storage also works for the current page only.
 
If anyone knows how to handle this situation.
 
Regds
SNI
Posted 18-Mar-14 20:42pm
SNI1.5K

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

This is not how Web works. Pages are pretty much independent. When a page is received from the server, it is executed on its own, only the page created by Javascrip can communicate with the parent page. If you got two different pages by two different HTTP responses, they are independent. They can communicate only indirectly, through some agent external to them. It could be database, or session states, normally, something which is done through the server. I'm not giving you any detail on that as you never mentioned that you are using any server-side technology.
 
—SA
  Permalink  
Comments
SNI at 19-Mar-14 2:09am
   
Thanks for your reply. We have few limitations bcoz we are using embeded version of linux so we are not able to use any server side scripting lang (e.g. php,ASP.Net...etc). We only have an option of shell script. But no idea how to use shell script to achieve this.
Sergey Alexandrovich Kryukov at 19-Mar-14 10:27am
   
This is not reply, this is the final answer. You cannot communicate directly between two independent pages. If you explain you real, ultimate goal, you may have a chance to get some practical advice.
What shell script and how it can be related to HTML or Javascript? Do I miss something?
—SA
SNI at 20-Mar-14 1:47am
   
nothing missed. Thanks for your answer.
Sergey Alexandrovich Kryukov at 20-Mar-14 10:38am
   
Sure. Will you accept it formally?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 562
1 Sergey Alexandrovich Kryukov 484
2 Maciej Los 325
3 DamithSL 233
4 Mathew Soji 195
0 OriginalGriff 7,168
1 Sergey Alexandrovich Kryukov 6,377
2 DamithSL 5,461
3 Manas Bhardwaj 4,876
4 Maciej Los 4,450


Advertise | Privacy | Mobile
Web04 | 2.8.1411023.1 | Last Updated 19 Mar 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100