Solved

HRef  window size

Posted on 2001-08-31
4
692 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 40 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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Select only the top record in a left join 13 50
JS does not refresh 6 44
Asp response.write to clients 6 47
SQL help please 15 37
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

759 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