Alright so I have a popup, and I need a javascript code that will 1) Grab the parent URL (The URL with the link to the popup) 2) Put that URL into a hidden form
@ananiasJul 09.2006 — #[code=html]<html><head><title>popup demonstrator</title> <script type='text/javascript'> function makePopup () { var r = "<html><head><title>Popup Window</title>n<script type='text/javascript'>n" + "var myParent;</scr" + "ipt></head><body>" + document.getElementById("popup").value + "n<br><a href='#' onmousedown='myParent.focus();return false'>Return To Parent</a></body></html>"; setTimeout(function () { var opts = 'toolbar=yes,location=yes,directories=yes,status=yes,' + 'menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes'; var w = window.open('', 'Popup Window', opts); w.document.write(r); w.document.close(); w.myParent = window; w.focus() }, 50); } </script> </head> <body> <h1>The Parent Page</h1> <p>Pressing the link creates a popup window that refers back to this one.</p> <form action="#"> <label for="popup">Enter the HTML for the body of the popup here:</label> <textarea id="popup" rows="15" cols="100"><h1>This is the Popup Window</h1></textarea><br> <a href="#" onmousedown="makePopup();return false">Show Popup</a> </form></body></html>[/code]
@ananiasJul 09.2006 — #I use a macintosh, where IE is unsupported. It works fine for me in Camino, Firefox, Mozilla, Safari, and Opera. In the past I've bothered to get things to work on the mac version of IE but that did't ensure it would work on the PC version so I lost interest in JScript. Perhaps someone well versed in the differences in the two languages could point out the fix.