sam
02-12-2003, 07:42 PM
Hi!
Let me try to make that clear:
I use JS to open a new page, and since I use a var to do that (var newPage= window.open(...)) I therefore can refer to that new page from the original page.
Now starts the problem: what I'm tyring to do is to change the source of an image (Note: I can't use ASP) that is already on the page based on the users selection. However, when I put in the line of code (i.e.: newPage.image1.src="...") I get a message pop-up saying "image1 is undefined" and other such messages.
Is there a way of either 1) waiting for the object (Image) to load, or 2) sending the new image source to a script in the new page?
I have read somewhere about a property called "readystate" but it didn't say very clearly how to use it, or if was even what I am looking for.
Sam.
Let me try to make that clear:
I use JS to open a new page, and since I use a var to do that (var newPage= window.open(...)) I therefore can refer to that new page from the original page.
Now starts the problem: what I'm tyring to do is to change the source of an image (Note: I can't use ASP) that is already on the page based on the users selection. However, when I put in the line of code (i.e.: newPage.image1.src="...") I get a message pop-up saying "image1 is undefined" and other such messages.
Is there a way of either 1) waiting for the object (Image) to load, or 2) sending the new image source to a script in the new page?
I have read somewhere about a property called "readystate" but it didn't say very clearly how to use it, or if was even what I am looking for.
Sam.