links in Mozilla

S

Sonnich

Hi all!

I have this in IE:
The font change works in both IE and mozilla, but the link does not
work in mozilla... can anyone help stupid me?

BR
Sonnich

<a
onmouseout="this.className=&quot;&quot;"
onmouseover="this.className=&quot;BOLD&quot;"

onclick="OpenWin(&quot;file:///\\\\some_server/some_folders/file.pdf&quot;);">
here
</a>

The openwin is :

function OpenWin(targ)
{
alert (targ); // testing
window.open(targ);
}
 
B

Benjamin Niemann

Sonnich said:
Hi all!

I have this in IE:
The font change works in both IE and mozilla, but the link does not
work in mozilla... can anyone help stupid me?

<a onclick="OpenWin(&quot;file:///\\\\some_server/some_folders/file.pdf&quot;);">
here
</a>

Backslashes are not allowed in URLs. Although Windows uses the backslash as
a seperator, always use the forward slash in URLs. IE is known
to 'auto-correct' backslashes into correct slashes, but other browsers are
not so forgiving. The correct URL should be
<file://some_server/some_folders/file.pdf>.
 
J

Jonathan N. Little

Sonnich said:
Hi all!

I have this in IE:
The font change works in both IE and mozilla, but the link does not
work in mozilla... can anyone help stupid me?

BR
Sonnich

<a
onmouseout="this.className=&quot;&quot;"
onmouseover="this.className=&quot;BOLD&quot;"

onclick="OpenWin(&quot;file:///\\\\some_server/some_folders/file.pdf&quot;);">
here
</a>

The openwin is :

function OpenWin(targ)
{
alert (targ); // testing
window.open(targ);
}

You've made the most common Windows-centric error, '\' backslashes are
*Windows only*, for the rest of the 'world' it is '/' forward slashes.

file://///some_server/some_folders/file.pdf

and the onclick handler is JavaScript so you would not use HTML
entities, but single quote in this situation

.... onclick="OpenWin('file://///some_server/some_folders/file.pdf');">
 
J

Jonathan N. Little

Benjamin said:
Backslashes are not allowed in URLs. Although Windows uses the backslash as
a seperator, always use the forward slash in URLs. IE is known
to 'auto-correct' backslashes into correct slashes, but other browsers are
not so forgiving. The correct URL should be
<file://some_server/some_folders/file.pdf>.

Not enough slashes there for any browser other than IE, need 5.

file://///server_name...
 
S

Sonnich

Jonathan said:
You've made the most common Windows-centric error, '\' backslashes are
*Windows only*, for the rest of the 'world' it is '/' forward slashes.

file://///some_server/some_folders/file.pdf

and the onclick handler is JavaScript so you would not use HTML
entities, but single quote in this situation

... onclick="OpenWin('file://///some_server/some_folders/file.pdf');">

None of the suggestions work.

I have the code as here now, and tried whatever (except the right
thing).
I have a PHP thing, which runs on a server, then creating a PDF file on
another server, which I'd like to open.
The alert is present, but the file is never opened, not even a window.
 
S

Sonnich

Some results:

<href="file://///some_server/some_folders/file.pdf­">
- does not work in IE (no action at all)
- works in mozilla, but returns an error 443 at all times.
 
J

Jonathan N. Little

Sonnich said:
Some results:

<href="file://///some_server/some_folders/file.pdf­">
- does not work in IE (no action at all)
- works in mozilla, but returns an error 443 at all times.

Not aware of an error code 443 (up to 425, but not 443). Are use sure it
is not a post address number not an error code? 443 is standard SSL
HTTPS. Anyway, Dow you have a webserver running? If so, don't use
file:// protocol but http:// and you will have better results....
 
S

Sonnich

Rik said:
Try the IP-adress instead of the servername.

else:
http://ieview.mozdev.org/ (it is said it can be made to open file://*
automatically in IE).
or:
apt-get install mozilla-firefox-gnome-support

Sorry, I haven't been dealing with this for some time.

I tried to pull the PDF file from windows explorer into Firefox - the
result (file://///server/folder/file.pdf) opened well. I tried to copy
that into HTML as follows:

<a
href="file://///server_name/some_folder/some_file.pdf">test1</a><br>';
<a
href="https://172.25.33.31/some_folder/some_file.pdf">test2</a><br>';
<a
href="file://///172.25.33.31/some_folder/some_file.pdf">test3</a><br>';

Only the 2nd one procudes "Bad Request (Invalid Hostname)", the other
(1 and 3) do not no anything. Appearently there is a difference for
opening it by a link and the mouse.
So far I have not found solution for this.

BR
Sonnich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top