Hello!

I'm having difficulties capturing a variable from the main window when
loading Greybox.

I've read a bunch of posts on this topic, and have come up with the
following:

MAIN WINDOW
<a href="preview_content.php" id="txtOwnCode" onclick="return
GB_showCenter('Preview Message', this.href)"><img src="images/
preview_button_own_code.gif" border="0"></a>

The ID reference is used elsewhere on the page to identify content
entered into a generic text box. This is the content I need to be
displayed in GREYBOX. So here's the code for the above-referenced
preview_content.php script - the script that loads in Greybox:

<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<title>Template content Preview</title>
<link rel='stylesheet' type='text/css' href='layout/styles.css' />
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<script>
function LoadContent(){
    var content = parent.parent.document.getElementById
("txtOwnCode").value;
    document.write(content);

}
</script>
</head>
<body onload="LoadContent();">
</body>
</html>


I tried swapping out the <body onload.... stuff with the
AJS.AEV(window, 'load', function() {
   ...
based on many previous posts, but can't seem to get that working
either...

Any specific help would be fantastic - I'm a newbie!

Thanks,

John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"GreyBox" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/greybox?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to