Simple HTML Question

OK this is driving me nuts.

I just want to open a new window with the target=_blank in attribute of the anchor tag. No problem. Thing is, I can’t get the window to be a specific height and width.

I’ve tried -

<A TARGET=_BLANK height=10 href=test.htm>test htm</A>

and

<A TARGET=_BLANK style=height:10 href=test.htm>test htm</A>

Neither opens up the window at the smaller size.

I’m seeing zebras, what’s up?

If you want to open up a window with specific attributes (height, width, etc) you’ll have to use JS to do it.

function openWindow(url)
{
wheight=“200”;
wwidth=“410”;
wleft=“200”;
wtop=“200”;
opts=‘width=’ + wwidth + ‘,height=’+wheight+ ‘,status=yes,resizable=1,left=’ + wleft + ‘,top=’+wtop;
newWindow=window.open(url,‘windowname’,opts);

}

TTBOMK, you cannot set options on the ‘default’ target(s) (_blank, _new, etc).

secondly, in your <a…> tag above, the style you’ve put in only refers to the element itself, not the window you’re trying to open.

You can’t do it just HTML, but you can with JavaScript. This site holds your hand and actually generates the code for you to insert in your HTML.

Cool, thanks. I was sure I had lust done it with HTML before.

Here’s script you can embed within the link itself:
<a href="#" onClick=“CmgPopUp=window.open(‘yourpage.htm’,‘CmgPopUp’,‘toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=400,height=300’); return false;”>