Help - Search - Members - Calendar
Full Version: Window Sizing Problem
HTMLHelp Forums > Web Authoring > Markup (HTML, XHTML, XML)
Durban
Hi,

I know that this is bread and butter for most on this site but perhaps someone could help me out.
I would like to be able to click a graphic on screen that pops a window open of specific size.

I can do it with a text link:

<a href="java script:ShowPopUp('http://mywebpage',500,500)">Click Here</a>

I can also do it with a graphic - just cant specify size:

<a target="_blank" href="http://mywebpage">
<img border="0" src="http://mygraphic"</a>


Can anyone help??
Darin McGrew
QUOTE(Durban @ May 3 2007, 07:04 AM) *
I would like to be able to click a graphic on screen that pops a window open of specific size.
See the FAQ entry How do I create a link that opens a new window of a specific size?

QUOTE(Durban @ May 3 2007, 07:04 AM) *
I can do it with a text link:

<a href="java script:ShowPopUp('http://mywebpage',500,500)">Click Here</a>
You shouldn't use the javascript: prefix. In href attributes, you should use real URLs instead (as demonstrated in the FAQ entry linked above). In onclick and other event handlers, you don't need it.

QUOTE(Durban @ May 3 2007, 07:04 AM) *
I can also do it with a graphic - just cant specify size:

<a target="_blank" href="http://mywebpage">
<img border="0" src="http://mygraphic"</a>


Can anyone help??
The tags for the a element are the same whether it's a graphic link or a text link. The only difference is what goes between the <a> and the </a>.

BTW, make sure you use appropriate alt attributes for graphic links.
Durban
Thanks for the reply but I am still none the wiser as to finding a bit of code that will let me let me use a graphic to open a window of specific size.

I am not a programmer and do not know what 'event handlers' and 'appropriate alt attributes' are. I really tried to read the pages you linked to but its like learning a language and it just doesnt make sense to me.

Just loking for a simple line of code to do a wee job that i need done.
Darin McGrew
Please see the FAQ entry Where can I learn about HTML?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.