Forum Moderators: open
I have a question for you and any help would be appreciated.
I have a webpage (these are examples only):
[widgetname.com...]
and on that page are several clickable links that open js windows with content.
eg:
javascript:jsOpenWnd (372,'widgetname','widgetname2')
Is there a way I can make a link from another page, eg:
[widgetname2.com...] that will go to the javascript window content from the first page?
I don't want the link to have to go back to the first page and then have the user click on a link just to open the js window, can I combine the two into one link?
Any help would be appreciated and if this request isn't too clear then, well...you should see my desk!
Thanks
BaseVinyl
If that isn't confusing enough, I'll be happy to obfuscate it more.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Parent Demo File</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
html,body{height:100%;}
</style>
<script type="text/javascript">
var v="4";
function mkWin(){
winOne=window.open("child_file_name.htm","windOne","height=300px,width=400px,left=200px,top=200px");
}
</script>
</head>
<body onclick="mkWin();">
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Child Demo File</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
html,body{height:100%}
</style>
<script type="text/javascript">
function ckVar(){
alert(opener.v);
}
</script>
</head>
<body onclick="ckVar();">
</body>
</html>
[edited by: Rambo_Tribble at 3:31 pm (utc) on June 2, 2004]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Fun with windows</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<style type="text/css">
html,body{height:100%;}
</style>
<script type="text/javascript">
function opWin(){
winOne=window.open("","winOne","height=200px,width=300px,left=100px,top=200px");
winTwo=window.open("","winTwo","height=200px,width=300px,left=300px,top=300px");
winOne.document.write('<html><head><title></title><style text/css>html,body{height:100%}</style>'+
'</head><body id="pgBod"></body></html>');
winOne.document.close();
winTwo.document.write('<html><head><title></title><style text/css>html,body{height:100%}</style>'+
'<scr'+'ipt type="text/javascript">'+
'function changeOne(){opener.winOne.document.getElementById("pgBod").style.background="#DEE";}'+
'</scr'+'ipt></head><body id="pgBod" onclick="changeOne();"></body></html>');
winTwo.document.close();
}
</script>
</head>
<body onclick="opWin();">
</body>
</html>