Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

userData persistence in new Window

Posted on 2004-04-14
4
Medium Priority
?
573 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

636 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