Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 21st, 2009, 06:21 AM
Authorized User
 
Join Date: Sep 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default Firefox: open file, security problem

Hi to All,
I have this problem:

with IE I can open a file 1.txt with the code posted, but with FF 3.5.2 it happens nothing and in the console error appears the message:

Security problem: the contents in http://fwws01329528/test.asp (the name of the server and the page loaded) can' t load or have links that cross-refer to file://///sif5/tmp/1.txt

In which way it' s possible to solve the problem ??

Thanks a lot in advance !!!

html>

<head>
<title>TEST</title>
<Script Language="JavaScript">
function notify(n) {
if (n==1) {
window.open('file://///sif5/tmp/1.txt'); }
}
</script>
</head>

<body>

<div align="center">
<table>
<tr>
<form method="POST" webbot-onSubmit language="JavaScript" name="FrontPage_Form2">
<td width="243"
style="border-left-style:none; border-left-width:medium; border-right-style:solid; border-right-width:1; border-top-style:solid; border-top-width:1; "
height="39">
<input type="submit" style="width:66px;" value="Appr" name="Send" onClick="notify(1)">
</td>
</tr>
</form></table>
</div>

</body>
</html>
 
Old September 21st, 2009, 04:03 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Well, not to ask a dumbass question, but why do you care??

This page is never going to run on any machine except the one you are using now (or some other machine on your same inTRAnet), so just be happy using MSIE. Incidentally, I think that even MSIE 8 (and maybe 7) would complain in the same way, until/unless you manually lowered your security settings.
 
Old September 23rd, 2009, 04:08 AM
Authorized User
 
Join Date: Sep 2009
Posts: 13
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Working only in Intranet,
with an external help I solved my problem:

using javascript sintax for:
window.open http://server_name/path_name/file_name.txt

I have created inside IIS a virtual directory with an alias,
and in this way I can see, as part of the server, a remote machine directory with inside the files.txt that I want to recall with IE and FF ...

 
Old September 23rd, 2009, 07:11 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Nice solution!

Much better then using file:// in any case.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with AJAX in Firefox geoko BOOK: Professional Ajax ISBN: 978-0-471-77778-6 2 June 27th, 2009 11:57 AM
input type file design in firefox ragu_nit Javascript 3 August 27th, 2007 02:20 PM
Open the "Open File" dialogue box piratelordx Access VBA 4 March 14th, 2006 10:08 PM
firefox problem axeman XSLT 0 November 21st, 2005 10:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.