• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple Pop-Up Problem  RSS feed

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i want to open multiple popup in single window but problem is that,when i put alert in my code than it works fine but without alert only open last url(in mozilla but work fine in IE), so please tell me how i open multiple popup in single window in mozilla???

Regards
Prem
 
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We can not read minds here. What is the code that you are using to open these windows?

Eric
 
sonu rai
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric
this is the code

function popitup(){
var myArray1=new Array();
myArray1=getValue();
for(var i=0;i<myArray1.length;i++){
window.open(myArray1[i],'selected_values','width=400,height=200,left=200,top=200, scrollbars=yes, toolbar=yes,resizable');
}
}




when i put the alert in for loop its work fine in mozilla otherwise its open a last url ,so please give me solution how i open multiple url in single window so i can see by clicking back button??
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to give each window an unique name.

window.open(myArray1[i],'selected_values' + i,...

Eric
 
sonu rai
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric

I have tried but all URL open in different window I want all URL open in same window, so I can see it by clicking back button ,but previous code work fine in IE which I have given ,problem in mozilla .Please help its urgent
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well that is a strange thing to do....never saw anyone do something like that.

You probably need to let the page load, so you should not do a for loop. Probably should look into a setInterval/setTimeout to do a loop.

Eric
 
sonu rai
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Eric

Thanks for Reply

Can you please explain in detail ,what you said ,Is there any functionality to use hidden(the alert which never appear on screen) alert or can I write code which work as alert or any more solution ???
 
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could try to open one at a time and make the two windows conversational. Let's say the child window knows it is showing message 1 and has a next button to go to message 2. Its onClick() might say ...

And the parent's showMessage(n) could say
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!