links in Mozilla

Discussion in 'HTML' started by Sonnich, Jul 10, 2006.

  1. Sonnich

    Sonnich Guest

    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);
    }
    Sonnich, Jul 10, 2006
    #1
    1. Advertising

  2. Sonnich wrote:

    > 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>.


    --
    Benjamin Niemann
    Email: pink at odahoda dot de
    WWW: http://pink.odahoda.de/
    Benjamin Niemann, Jul 10, 2006
    #2
    1. Advertising

  3. Sonnich wrote:
    > 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');">

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jul 10, 2006
    #3
  4. Benjamin Niemann wrote:
    > Sonnich wrote:
    >
    >> 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>.
    >
    >


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

    file://///server_name...


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jul 10, 2006
    #4
  5. Sonnich

    Sonnich Guest

    Jonathan N. Little wrote:
    > Sonnich wrote:
    > > 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');">


    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.
    Sonnich, Jul 10, 2006
    #5
  6. Sonnich

    Sonnich Guest

    Sonnich wrote:
    > Jonathan N. Little wrote:
    > > Sonnich wrote:
    > > > 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');">


    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.
    Sonnich, Jul 10, 2006
    #6
  7. Sonnich wrote:
    > Sonnich wrote:
    >> Jonathan N. Little wrote:
    >>> Sonnich wrote:
    >>>> 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');">

    >
    > 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....

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Jul 10, 2006
    #7
  8. Sonnich

    JDS Guest

    On Mon, 10 Jul 2006 08:14:49 -0700, Sonnich wrote:

    > Some results:
    >
    > <href="file://///some_server/some_folders/file.pdf­">



    I seriously doubt that "file://" will work.

    --
    JDS
    JDS, Jul 10, 2006
    #8
  9. Sonnich

    Rik Guest

    JDS wrote:
    > On Mon, 10 Jul 2006 08:14:49 -0700, Sonnich wrote:
    >
    >> Some results:
    >>
    >> <href="file://///some_server/some_folders/file.pdf­">

    >
    >
    > I seriously doubt that "file://" will work.


    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

    Grtz,
    --
    Rik Wasmus
    Rik, Jul 10, 2006
    #9
  10. Sonnich

    Sonnich Guest

    Rik wrote:
    > JDS wrote:
    > > On Mon, 10 Jul 2006 08:14:49 -0700, Sonnich wrote:
    > >
    > >> Some results:
    > >>
    > >> <href="file://///some_server/some_folders/file.pdf­">

    > >
    > >
    > > I seriously doubt that "file://" will work.

    >
    > 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
    Sonnich, Jul 17, 2006
    #10
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Kingscott
    Replies:
    0
    Views:
    321
    Mike Kingscott
    Oct 27, 2003
  2. www.westerncartooncards.ca

    Exchange Links < Western Cartoon Cards > Exchange Links

    www.westerncartooncards.ca, Jul 12, 2004, in forum: HTML
    Replies:
    2
    Views:
    1,219
    Toby Inkster
    Jul 12, 2004
  3. Henri
    Replies:
    9
    Views:
    1,816
    Toby Inkster
    Feb 22, 2005
  4. tshad
    Replies:
    2
    Views:
    433
    tshad
    Apr 21, 2005
  5. Garrett Smith
    Replies:
    14
    Views:
    298
    David Mark
    May 26, 2009
Loading...

Share This Page