|
|
|
|
![]() ![]() |
Jun 9 2005, 12:51 PM
Post
#1
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 535 Joined: 14-February 05 From: Oslo, Norway Member No.: 3,759 |
I will try to explain:
When clicking on the link, a pop-up window will be opened. I also want to have the width=300 and height=160 (just examples Could someone give me a short code for that? |
|
|
|
Jun 9 2005, 01:44 PM
Post
#2
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 59 Joined: 8-June 05 Member No.: 7,996 |
This is the code:
CODE <html> <head> <script> function popup(){ window.open('URL','window_name','width=300,height=160,scrollbar=1'); } </script> </head> <body> <a href='javascript:popup()'>popup!!</a> </body> </html> |
|
|
|
Jun 9 2005, 05:55 PM
Post
#3
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 535 Joined: 14-February 05 From: Oslo, Norway Member No.: 3,759 |
Thank you.
But if I want more than one different popup, how can I do that? |
|
|
|
Jun 9 2005, 06:18 PM
Post
#4
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 59 Joined: 8-June 05 Member No.: 7,996 |
To open more than one popup, with one link, just copy inside the function popup(), the line window.open and use diferent window names.
Thats all. If I that was usefull, vote me!. |
|
|
|
Jun 9 2005, 07:04 PM
Post
#5
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 535 Joined: 14-February 05 From: Oslo, Norway Member No.: 3,759 |
No, no... Not with one link. If I have [link 1] which opens popup 1, and [link 2] which opens popup 2... How can I do that?
|
|
|
|
Jun 9 2005, 07:20 PM
Post
#6
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 59 Joined: 8-June 05 Member No.: 7,996 |
The code modified for you.
CODE <html> <head> <script> function popup(link,window_name){ window.open(link,window_name,'width=300,height=160,scrollbar=1'); } </script> </head> <body> <a href='javascript:popup("URL1","window1")'>popup 1</a> <br> <a href='javascript:popup("URL2","window2")'>popup 2</a> <br> <a href='javascript:popup("URL3","window3")'>popup 3</a> <!-- And so on... --> </body> </html> |
|
|
|
Jun 9 2005, 07:34 PM
Post
#7
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 535 Joined: 14-February 05 From: Oslo, Norway Member No.: 3,759 |
Great, but still a little thing: How can the different popups have different sizes?
|
|
|
|
Jun 10 2005, 12:33 PM
Post
#8
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 59 Joined: 8-June 05 Member No.: 7,996 |
The "popup 1" is width=300 and height=160
The "popup 1" is width=400 and height=300 The "popup 1" is width=600 and height=10 CODE <html> <head> <script> function popup(link,window_name,width,height){ window.open(link,window_name,'width='+width+',height='+height+',scrollbar=1'); } </script> </head> <body> <a href='javascript:popup("URL1","window1",300,160)'>popup 1</a> <br> <a href='javascript:popup("URL2","window2",400,300)'>popup 2</a> <br> <a href='javascript:popup("URL3","window3",600,10)'>popup 3</a> <!-- And so on... --> </body> </html> ______________________________ If that was usefull, vote me! |
|
|
|
Jun 10 2005, 08:29 PM
Post
#9
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 217 Joined: 2-January 05 Member No.: 3,084 |
Could I do by this way?
CODE <html> <head> <script> function popup(){ window.open('URL','window_name','width=300,height=160,scrollbar=1'); } function popup2(){ window.open('URL','window_name','width=300,height=160,scrollbar=1'); } </script> </head> <body> <a href='javascript:popup()'>popup!!</a> <a href='javascript:popup()'>another popup!!</a> </body> </html> ? |
|
|
|
Jun 11 2005, 06:49 AM
Post
#10
|
|