Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
Ok, this is a question and not a tip, if someone provides the answer, then it will be a tip

Anyway, I know how to make a link open up to a new window using _blank. But rather than the new window just being the default size, how do I specify a size? I know this is done on a million sites since most of the popups you receive are done this way.

can it be done in HTML or do you need javascript or something to accomplish this?

Sponsored Links
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Can't be done with just html unfortunately. This is how it is done with javascript:

Code
<br />  <script language="javascript"><br />   function openNewWindow(url) {<br />    window.open(url,'newPage','scrollbars=no,resizable=no,width=400,height=400');<br />   }<br />  </script><br /><br />  <a href="javascript:openNewWindow('newpage.html');">Open new window at 400 x 400</a><br />

Joined: Feb 2002
Posts: 1,759
Addict
Addict
Offline
Joined: Feb 2002
Posts: 1,759
excellent, that is what I was looking for Thanks.

Joined: Jun 2003
Posts: 1,025
Junior Member
Junior Member
Offline
Joined: Jun 2003
Posts: 1,025
Here's another way to do it.
Code
<br /><a href="javascript: void(0)" onclick="window.open('https://ubbdev.com/forum/pals/shoutdisplaypal.php','shoutboxpal','width=200,height=400,top=100,left=150,screenX=1,screenY=1,scrollbars=yes,resizable=yes');">Shout Box</a><br />


As you can see, I pilfered that from the IIP page. I test it in both a .php file and a .html file. So that is another way to do it.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)