?
Solved

userData persistence in new Window

Posted on 2004-04-14
4
Medium Priority
?
571 Views
Last Modified: 2008-02-01
I am using the userData persistence to save information on the client.  Everything is working fine saving and loading values as long as I use the same window.  However, I would like to open a new (child) window and get a value from the userData store in the child window:

function test(){
      oSharedData.load("XMLSharedData");
      alert(oSharedData.getAttribute("txtSysNme"));
}

My child window has the .userData style element specified and a DIV element with userData class (ID=oSharedData).  I still am not able to use getAttribute from this new window.  Does anybody have any ideas????

codeguy
0
Comment
Question by:codeguy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 3

Accepted Solution

by:
ljfernandez earned 1000 total points
ID: 10826526
var obj = window.opener.oSharedData;

obj.load("XMLSharedData");

--Lisa
0
 
LVL 3

Expert Comment

by:ljfernandez
ID: 10826726
Sorry, read the question wrong.

First name the window you are opening:

var newwin = window.open("url here...");
Then:

var obj = newwin.document.all.oSharedData;

obj.load("XMLSharedData");

--Lisa
0
 
LVL 3

Expert Comment

by:ljfernandez
ID: 10826746
The second part:

var obj = newwin.document.all.oSharedData;

obj.load("XMLSharedData");

Is in the parent and refers to the div with the userdata class in the child.

--Lisa
0
 

Author Comment

by:codeguy
ID: 10826829
Thanks much.  Worked like a charm!!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question