Having a link open in a new window...

I want to create an interactive map and have people click on parts to get a picture. I know how to have a link open in a new window, but how do I specify the size of the window? I want the map to be in the background and have the picture only be 1/4 of the browser size. thanks
richtwesAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
knightEknightConnect With a Mentor Commented:
in a link, that would be:

<A  href='Open'  onClick='var myWin = window.open("someURL.htm","myWin","width=400,height=300");return false;'>Open</a>
0
 
knightEknightCommented:
var myWin = window.open("someURL.htm","myWin","width=400,height=300");
0
 
avnerCommented:
or a little simpler :
<A  href='http://www.yahoo.com' target="_blank">Open</a>

This will allow you doing that with pure HTML, no JS.
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
CJ_SCommented:
avner, but won't let you specify the size.

I can also suggest to remove all items in the new browser:
<A  href='Open'  onClick='var myWin = window.open("someURL.htm","myWin","width=400,height=300,location=no");return false;'>Open</a>

Points to KnightEKnight.

CJ
0
 
avnerCommented:
Hmm.. I guess I missed the important part of the question.
Sorry if I made any confusion.
0
 
richtwesAuthor Commented:
I would like the HTML code for it and no java. thanks for the info so far. Avner was on the right track...but now how do I specify size in HTML?
0
 
knightEknightCommented:
actually, what was proposed is JavaScript, not Java ... and it is widely supported.  I don't know of any way to do it using pure HTML.
0
 
cdbsiCommented:
<A href='javascript:void(0)' onClick="window.open('someURL.htm','','width=400,height=300,location=no')">Open</a>
0
 
Computer101Commented:
For reasons stated below, proposed answer rejected

Computer101
E-E Moderator
.
Comments
Comments are intended to be used as a collaboration tool. Many Experts choose to post their solutions as comments only.

Answers
An answer is a specific solution to a question and should be submitted if it will solve the questioner's problem and doesn't duplicate a previous comment.

Comment Vs. Answer
If you are unsure of your solution, post it as a comment. Members can accept comments as solutions and award you Expert Points for them.

For more tips on comments and answers, click here.
0
 
pagemastahCommented:
you can't specify window sizes just by pure HTML... try their suggestions involving javascript.

if javascripting scares you and choose to avoid it, then you can't create new things since HTML is very limited when it comes to dynamics.

all i can say is follow their suggestions or you may choose to learn javascript yourself.

here's a good start for learning javascript:
http://www.htmlgoodies.com/primers/jsp/

goodluck! :)
0
 
richtwesAuthor Commented:
THanks..didnt' know it couldn't be done in HTML. Your suggestion works fine.
0
 
NetminderCommented:
cdbsi,

Your account has been suspended pending your reply to Admin.

Netminder
CS Moderator
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.