[thelist] To Joshua Olson, or whoever can help me with this Javascript problem

Warden, Matt mwarden at odyssey-design.com
Fri Sep 29 20:26:06 CDT 2000


NOTE: I *did* test this, so it does work (at least in IE5.5).

parent.htm
----------



<html>
<head>
<script language="JavaScript" type="text/javascript">


var evolt = "sexy";

function getEvolt()
{
 return evolt;
}

function openTestWin()
{
 window.open("child.htm", "Child");
}

</script>
</head>
<body>
<a href="javascript:openTestWin();">Open Child Window</a><br />
</body>
</html>





child.htm
---------

<html>
<head>
<script language="JavaScript" type="text/javascript">

function getParentVariable()
{
 return window.opener.getEvolt();
}

function testParentAccess()
{
 alert(getParentVariable());
}

</script>
</head>
<body>
<a href="javascript:testParentAccess();">Test Access To Parent Vars</a><br
/>
</body>
</html>


hth,


--
mattwarden
mattwarden.com



----- Original Message -----
From: Henry Vaillant <henrygvaillant at hotmail.com>
To: <thelist at lists.evolt.org>
Sent: Friday, September 29, 2000 8:32 PM
Subject: [thelist] To Joshua Olson, or whoever can help me with this
Javascript problem


> Dear J.O. et. al.,
>
> This is in reference to getting variable values in a parent HTML/Java-
> script page to be displayed in a child HTML page opened in a different
> browser window.
>
> I tried that bit of code you gave me a few days back,  but I can't seem
> to get it to work -- maybe I'm doing something wrong.  In any case, I
> was wondering if someone could send me the complete source code for the
> parent and child pages concerned,  with all the HTML and Javascript code
> in place (and not too complex -- I'm looking for something relatively
> simple).  Once I have the basic skeleton,  I think I can take it from
> there.
>
> Any help in this would be tremendously appreciated.
>
> Sincerely,  Henry G. Vaillant
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
>
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list