rowanseymour Member Posts: 284 From: Belfast, Northern Ireland Registered: 02-10-2001 |
I have 2 html pages. The first one calls window.open() to display the second in a popup window. Then trys to change the value of single text edit in the second pages only form. The first page is simplified as follows: <HTML> function doPopup(url, msg) </SCRIPT> The second page... <HTML> Instead of working it throws up a lovely error box saying... Line: 9 Am I missing something really obvious here??? Please say yes because this part of a huge piece of coursework I have to hand in on Monday |
||
Krylar Administrator Posts: 502 From: MD, USA Registered: 03-05-2001 |
Hiya, The problem is in that you're naming the variable that holds the popup window the same as the name you're giving the window.
Note that popup is your new handle to the window, but JavaScript is also being told that the window name it popup. I changed the window name to newpopup and it worked for me.
This *did* work in IE, by the way, but IE uses JScript which--strangely--is a bit more forgiving of things such as this. Netscape is more of a stickler for most things...and currently has a number of plain Java issues. Hope that works for you too! -Krylar ------------------ [This message has been edited by Krylar (edited May 10, 2001).] |
||
rowanseymour Member Posts: 284 From: Belfast, Northern Ireland Registered: 02-10-2001 |
Cheers but that hasn't fixed it (IE6b + Win2000) . It's weird - it works a few times then starts throwing up errors. I have found another way to do this though by handing onLoad() in the popup page and then setting the value of the text field, reading from the parent page using the opener handle. Me thinks window.open() is returning before the form elements are properly initialized. A bug perhaps? In a microsoft product? Thanks anyway |
||
Krylar Administrator Posts: 502 From: MD, USA Registered: 03-05-2001 |
hmmmm...kooky. Didn't work for me in Netscape at all and it ran fine in IE. Of course I don't have Win2000 here, so maybe that has something to do with it. Well, sorry I couldn't help! -Krylar ------------------ |