How to programmatically open a new browser window

  • Thread starter Thread starter Alice
  • Start date Start date
A

Alice

If I have a browser already up and I wish to
open a link, I want to open this link in another
browser window, how can I do?

Thanks for your help!
-Alice
 
Brian,

Thanks for the reply, but this doesn't solve my problem.
I would like to put it in my program, I can't tell
all users to hold the shift key and then click on the url.

or how can I pass this thing in my html?

-Alice
 
you have two ways:
1º- you can add to your a href a target property
< s href="xpto.html" target="_blank" > link < \a >
2º- you can add javascript to do it
< a href="#" onclick="javascript:window.open
('xpto.html', 'windowname', 'windowparameters');return
false;" > link < \a >

(all the html is without the spaces...)
 
Hi Tiago,

Thanks for the response. This works, but I was
wondering if we could pass the window size parameters
directly. 'cause I have to pass the url as hyperlink
in a word document, so I can't program it.

Thanks again,
Alice
 
You could try the JScript window.open method:

window.open( url, name, (opts, (replace)))

example: window.open("http://www.msn.com", "",
"width=300,height=800")

There are more options, but I these two I remember.

--
-- This posting is provided "AS IS" with no
-- warranties, and confers no rights.
--
-- Please do not send e-mail directly to this alias.
---This alias is for newsgroup purposes only.
--
Hi Tiago,

Thanks for the response. This works, but I was
wondering if we could pass the window size parameters
directly. 'cause I have to pass the url as hyperlink
in a word document, so I can't program it.

Thanks again,
Alice
 
Back
Top