Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

HRef  window size

Posted on 2001-08-31
4
Medium Priority
?
695 Views
Last Modified: 2008-01-09
is there a way to control the size of the window opened by an <a href> ?
0
Comment
Question by:trekkee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
thunderchicken earned 160 total points
ID: 6445053
Easy Easy

Here's a good tutorial:

http://www.zdnet.com/devhead/stories/articles/0,4413,2139716,00.html

Here's the sample from that page:

<FORM><input type="button" Value="Open Sesame!"
ONCLICK="window.open('http://www.zdnet.com/devhead/static/javascript/
windowsize/buttonwindow.html', 'groovywindow',
'toolbar=no,location=no,directories=no,status=no,
menubar=no,scrollbars=yes,resizable=no,copyhistory=no,
width=100,height=350')"></FORM>
0
 
LVL 11

Expert Comment

by:thunderchicken
ID: 6445057
Here's the code from that page you want with a direct hyperlink

<A HREF="index.html"
ONCLICK="window.open('iamwindowhearmeroar.html',
'popup', 'toolbar=no,location=no,directories=no,
status=no,menubar=no,scrollbars=no,resizable=no,
copyhistory=no,width=300,height=150')">Click me.</A>
0
 
LVL 12

Expert Comment

by:Preece
ID: 6445344
listening...

Preece
0
 
LVL 18

Expert Comment

by:mgfranz
ID: 6445545
Yup!  Use this javascript function;

<script language="javascript">
if (window.screen) {
    var aw = screen.availWidth;
    var ah = screen.availHeight;
     aw = aw - 10;
     ah = ah - 25;
    }

var  mypopup=null
function popup(URL) {
     
     if ( mypopup && !mypopup.closed )
          { mypeopleup.close();
          }
mypopup = window.open(URL,"phone", 'scrollbars=1,menubar=0,resizable=1,background=white,toolbar=0,status=0,top=0,left=0,screenX=0,screenY=0,height=' + ah + ',width=' + aw);
}
</script>


It gets called like this;

<a href="javascript:popup('page.asp')">Click</a>
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question