pop-up

J

janice

Doesn't anybody know the answer to this, or am I in the wrong group? I am on
pins and needles to fix this, it is driving me crazy... I figures one of you
must know the answer and be able to help me out puleeesssseee.

Hi this is the script I am using for my pop-up box, it is for pictures that
are small and pop to a box to show an enlarged version... now what I want to
do is reuse the same box over and over instead of having like 30 boxes open
that people have to close. I think it might be annoying to close all those
boxes so what do I have to add to make all my pictures reuse the same box?


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "',
'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=420,height=330,left = 262,top = 222');");
}
// End -->
</script>
 
S

Stefan B Rusynko

You can't do it because you are unnecessarily generating a unique window name (id) for each in window in window.open(URL, '" + id +
"', ....
Make the name a constant (window.open(URL, myPopUp, ....) and you should be able to reuse it
See http://www.developer.irt.org/script/window.htm





| Doesn't anybody know the answer to this, or am I in the wrong group? I am on
| pins and needles to fix this, it is driving me crazy... I figures one of you
| must know the answer and be able to help me out puleeesssseee.
|
| Hi this is the script I am using for my pop-up box, it is for pictures that
| are small and pop to a box to show an enlarged version... now what I want to
| do is reuse the same box over and over instead of having like 30 boxes open
| that people have to close. I think it might be annoying to close all those
| boxes so what do I have to add to make all my pictures reuse the same box?
|
|
| <SCRIPT LANGUAGE="JavaScript">
| <!-- Begin
| function popUp(URL) {
| day = new Date();
| id = day.getTime();
| eval("page" + id + " = window.open(URL, '" + id + "',
| 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=420,height=330,left = 262,top = 222');");
| }
| // End -->
| </script>
|
|
 
J

janice

He Stefan, thanks for the info but I am a real beginner at this I went and
tried to fix it withsome of the things there and am not anywhere ahead so
what do I have to take out and how exactly do I put it in... I am not using a
separate html page for my popup... I just want to the new click to repalce
the picture that is displayed in the popup box. It is pictures of equipment
so after they view one picture they click and it replaces the old picture...
If this is not possible then I would like if you leave the page all the
popups close on their own without having to manually kill them..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top