PDA

View Full Version : Opening a new window


stevan
10-04-2002, 04:10 AM
I would like the following line to open in a new window
But only this line not every one on the page

<a href="http://Cruisewarehouse.cc">Cruisewarehouse.cc - Discounted Cruises to all Destination on all Cruise Lines</a><br>

I think it can be done by just adding a piece of code but I canot do it.

Thxs Steve
beginner

:confused:

Carl
10-04-2002, 04:44 AM
do

<a href="http://Cruisewarehouse.cc" target="_blank">

Carl

chrismiceli
10-04-2002, 04:46 AM
if you want to do it with html and it isn't in a frame then in the link you add this
<a href="url" target="mainframe">hi</a>
if you want to do it in javascript you need this, but it can be done in frames.

function test() {
window.open("url", "name", options)
}
<a href="url" onClick="test()"> hi</a>

that should do it for you

beetle
10-04-2002, 03:19 PM
Hey

I think chrismiceli's post is a tad misleading....

function test(nUrl) {
window.open(nUrl, "name", features)
}
<a href="page.htm" onClick="test(this.href)"> hi</a>

Where features is a string of window features as name/value pairs that are comma separated.

learn more about window.open here (http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp)