Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using javascript for open new windows in browser,it's successfuuly executed.but now i want same page in different popup windows,Advance thanks<pre lang="Javascript">function openph(lmg)
{
//debugger;


var url1 = "PriceListDtl.aspx?ResponseType=Edit&parentID&ID=" + lmg   ;

var newin = window.open( url1 , "test","top=0,left=0,menubar=no,toolbar=no,location=no, resizable=no,height=550,width=600,status=no,scrollbars=no,minimizable=no,maxmizable=no,resizable=0,titlebar=no;");
if ( newin .focus ())
{
 
newin .focus()
}
}
Posted

1 solution

Call the window with another name, that's all.(Check the names test1 & test2 & test3 in the code)
XML
<html>
<head>
<script type="text/javascript">
function open_win()
{
window.open("http://www.microsoft.com/","test1");
window.open("http://www.microsoft.com/","test2");
window.open("http://www.microsoft.com/","test3");
}
</script>
</head>
<body>
<form>
<input type="button" value="Open Windows" onclick="open_win()">
</form>
</body>
</html>

Now this script will open the same page 3 times & do changes based on your need. The trick is you need to change the name dynamically to open multiple windows
 
Share this answer
 
v2
Comments
Vasim889 24-Jan-12 5:12am    
Not like that. how to open one URL in many windows?anyway thanks
thatraja 24-Jan-12 5:14am    
The above script will work. Just change the URLs, try it
Vasim889 24-Jan-12 5:25am    
i am using 1nly 1 URL not 2 url?i click multi times but open one popup windows.
but i want how many times 2 click show more popup window?
thatraja 24-Jan-12 5:33am    
Check updated answer. You need to change the name property dynamically.
Manfred Rudolf Bihy 24-Jan-12 6:09am    
Correct, have a 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900