Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I need to open a new window

Status
Not open for further replies.

H33nry

Technical User
Apr 23, 2002
3
GB
Hi,

I need to open a new window from a &quot;<a href=&quot;somepage.htm>click here</a>&quot; type of link but I need the new window to open without toolbars\addressbars and such.

Anyone know where I can find a list of attributes for the &quot;<a>&quot; tag?? that will do this for me?

H3nry
 
Code:
<a href=&quot;#&quot; onClick=&quot;window.open('where.html','','toolbars=no')&quot;>click me</a>
---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
The javascript option works, but what Irealy need is some straight html.

reason

what I am trying to do is link to various files on another of our company network servers.

If I use

<a href=&quot;\\servername\folder\file.txt&quot; target=&quot;_blank&quot;>file.txt</a>

it works fine, but when I try to use the javascript window.open attribute it is treating it as if it was on my intranet server and I get a file not found error because it links to &quot;http:\\intranetserver\servernamefolderfile.txt&quot; including ripping out the &quot;\&quot;.

Any ideas?
 
use this file protocol
<a href=&quot;file://servername\folder\file.txt&quot;>link</a> ---------------------------------------
wmail.jpg


someone knowledge ends where
someone else knowledge starts
 
Thanks to everyone for your help and suggestions.

FYI I got it to work for me with this:-

<A href=&quot;#&quot; onClick=&quot;window.open('file://servername/folder/Myfile.txt','','menubar=yes,scrollbars=yes,resizable=yes')&quot;>My File</A>

I have also put in to an asp page that pulls in the file names and path from a database using:-

<A href=&quot;#&quot; onClick=&quot;window.open('<%=(Recordset1.Fields.Item(&quot;file_path&quot;).Value)%>','','menubar=yes,scrollbars=yes,resizable=yes')&quot;>My File</A>

I didn't want the address to be displayed as a small security measure against users being able to navigate easily straight to the folder. I know there are many ways that the users can if they want to. Including &quot;Ctrl+N&quot; for a new window or even as it is a shared folder they could map a drive straight into it, but thankfully 99% of staff are so computer illiterate I don't have to worry :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top