PDA

View Full Version : Javascript new tab



bobby9101
07-25-2005, 03:19 PM
How do i set my links to open in new tabs and windows?

ADAM Web Design
07-25-2005, 07:04 PM
target="_new" in your <a> tag will give you a new window. I'm not sure how it works with tabbed browsing, though.

bobby9101
07-26-2005, 09:41 AM
any way to do it to more than one at once?

nikkoss
07-27-2005, 04:10 AM
You would have to use javascript to open two or more windows;

<script language="JavaScript">
<!--
function newWindows() {
win1=window.open('http://www.webproworld.com','win1','status=1,scrollbars=1 ,toolbar=1,resizable=1,width=800,height=600');
win2=window.open('http://www.google.com','win2','status=1,scrollbars=1,tool bar=1,resizable=1,width=800,height=600');
}
//-->
</script>

Then in your link;

New Windows (javascript:void(0);)

ADAM Web Design
07-27-2005, 09:49 AM
What he said.