Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Html Editors Enhanced-html > Re: <a> Tag
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 35 of 112
Post > Topic >>

Re: <a> Tag

by Adrienne <arbpen2003@[EMAIL PROTECTED] > Apr 22, 2004 at 07:12 AM

Gazing into my crystal ball I observed "Chris" <none@[EMAIL PROTECTED]
> writing in
news:108e5l6e1h6dp89@[EMAIL PROTECTED]
 

> I was wondering if there was an actual way to specify the actual size
> of a "_blank" window to be opened using the tag"
> 
><a href="URL" target="_blank">Word Link</a>
> 
> I am not sure if and where you can specify the size of the blank window
> to be. This would be very helpful. Thanks
> 
> 
> 
> 

You would need javascript to do that, HTML is not a scripting language.  
But, think carefully before you do this.

Many people have pop-up blockers, or they have their browsers configured 
to block popups.  Some people also have their browsers refuse to open 
windows using the target attribute.

The target attribute has been removed from the newest HTML specification, 
and there is good reason for this.  Most people know how to open links in 
new windows, and will do so if they feel the need.  No one likes windows 
opened without their knowledge, and once one has been taken to the new 
window, they find it irritating and confusing because the Back button does

not work.  

Additionally, browsers that allow tabbed browsing occassionally have 
problems with windows that are opened of a certain size, and the user has 
no way to scroll the window.

But, this would be the way to do it:
<head>
<script type="text/javascript">
function openWin(URL) {
  myWin=open(URL, "displayWindow",
    "width=500,height=400,status=no,toolbar=no,menubar=no");
}
</script>
</head>
<body>
<p>This is the better way to do this, notice the return false in the 
onclick attribute, will still open the page if javascript is disabled.  
Here is a <a href="targetpage.htm" onclick="openWin
('targetpage.htm');return false" title="Target page opens in a pop-up 
window">target</a>.</p>
</body>
-- 
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com




 2 Posts in Topic:
Tag
"Chris" <non  2004-04-21 20:53:39 
Re: Tag
Adrienne <arbpen2003@[  2004-04-22 07:12:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 7:39:09 CDT 2008.