jscript won't open file://localhost - Apache

This is a discussion on jscript won't open file://localhost - Apache ; Hi, in Apache 1.3.26 since a system upgrade to SuSE 8.1 a javascript call open ("file://localhost") won't open a new window, as it did before. I call a KDE konqueror browser with http://localhost/x.html x.html having the following contents: < html ...

+ Reply to Thread
Results 1 to 7 of 7

jscript won't open file://localhost

  1. Default jscript won't open file://localhost

    Hi,
    in Apache 1.3.26 since a system upgrade to SuSE 8.1 a javascript call
    open ("file://localhost") won't open a new window, as it did before.
    I call a KDE konqueror browser with http://localhost/x.html
    x.html having the following contents:
    < html >
    < head >
    < script language=JavaScript >
    F1 = open("file://localhost/");
    F2 = open("http://localhost/");
    < /script >
    < /head >
    < body >
    < /body >
    < html >
    F2 is opened, but F1 not ! I tried to open not only a DocumentRoot, but with
    the same negativ result. I suppose this depends on some apache setting.
    Could somebody help me, please which one it is.
    regards, zbyszek
    --
    http://zbyszek.evot.org


    ---------------------------------------------------------------------
    The official User-To-User support forum of the Apache HTTP Server Project.
    See <URL:http://httpd.apache.org/userslist.html> for more info.
    To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
    " from the digest: users-digest-unsubscribe@httpd.apache.org
    For additional commands, e-mail: users-help@httpd.apache.org



  2. Default Re: jscript won't open file://localhost

    On Sun, 26 Oct 2003 17:58:53 +0200, Zbigniew Lisiecki wrote:

    > in Apache 1.3.26 since a system upgrade to SuSE 8.1 ajavascript
    > call open ("file://localhost") won't open a new window, as itdid


    If a javascript inside a page managed to get Apache to openwindows,
    I would become extremely suspicios!

    Maybe you're confusing web servers and web browsers? Apache is a
    server.

    BTW, file://localhost/ is a rather odd URL...

    Regards
    /Jonas
    --
    Jonas Eckerman, jonas_lists@frukt.org
    http://www.fsdb.org/



    ---------------------------------------------------------------------
    The official User-To-User support forum of the Apache HTTP Server Project.
    See <URL:http://httpd.apache.org/userslist.html> for more info.
    To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
    " from the digest: users-digest-unsubscribe@httpd.apache.org
    For additional commands, e-mail: users-help@httpd.apache.org



  3. Default Re: jscript won't open file://localhost

    On nie 26. of October 2003 20:51, Jonas Eckerman wrote:
    > On Sun, 26 Oct 2003 17:58:53 +0200, Zbigniew Lisiecki wrote:
    > > in Apache 1.3.26 since a system upgrade to SuSE 8.1 a javascript
    > > call open ("file://localhost") won't open a new window, as it did

    >
    > If a javascript inside a page managed to get Apache to open windows,
    > I would become extremely suspicios!
    >
    > Maybe you're confusing web servers and web browsers? Apache is a
    > server.
    >

    i thought Apache (web server) should forward it to the konqueror (web browser)
    At lease this is what it seemd to do before the upgrade. I'd like to open a
    konqueror window with some directory from a web page served by apache.
    Is it totaly against the rule ?

    > BTW, file://localhost/ is a rather odd URL...


    yes, it should be whatever dir possible like "file://"
    i can point it to the correct place later

    regards, zbyszek
    --
    http://zbyszek.evot.org


    ---------------------------------------------------------------------
    The official User-To-User support forum of the Apache HTTP Server Project.
    See <URL:http://httpd.apache.org/userslist.html> for more info.
    To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
    " from the digest: users-digest-unsubscribe@httpd.apache.org
    For additional commands, e-mail: users-help@httpd.apache.org



  4. Default Re: jscript won't open file://localhost

    Zbigniew Lisiecki wrote:
    > i thought Apache (web server) should forward it to the konqueror
    > (web browser)


    Yes, Apache serves the content to your browser. It does not do anything with
    any JavaScript in an HTML document, that is interpreted by the client
    (browser).

    > yes, it should be whatever dir possible like "file://"
    > i can point it to the correct place later


    Apache is an HTTP server. A 'file:///'-style URI, will use the 'file' scheme
    to display files on your local filesystem, and Apache will not have anything
    to do with it. This is purely an HTML/client issue.

    Regards,
    Robert Andersson


    ---------------------------------------------------------------------
    The official User-To-User support forum of the Apache HTTP Server Project.
    See <URL:http://httpd.apache.org/userslist.html> for more info.
    To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
    " from the digest: users-digest-unsubscribe@httpd.apache.org
    For additional commands, e-mail: users-help@httpd.apache.org



  5. Default Re: jscript won't open file://localhost

    On pon 27. of October 2003 10:37, Robert Andersson wrote:
    > Zbigniew Lisiecki wrote:
    > > i thought Apache (web server) should forward it to the konqueror
    > > (web browser)

    >
    > Yes, Apache serves the content to your browser. It does not do anything
    > with any JavaScript in an HTML document, that is interpreted by the client
    > (browser).
    >
    > > yes, it should be whatever dir possible like "file://"
    > > i can point it to the correct place later

    >
    > Apache is an HTTP server. A 'file:///'-style URI, will use the 'file'
    > scheme to display files on your local filesystem, and Apache will not have
    > anything to do with it. This is purely an HTML/client issue.


    Here is once more my question: the file x.html has the following contents:

    < html >
    < head >
    < script language=JavaScript >
    F1 = open("file:/");
    F2 = open("http://localhost/");
    < /script >
    < /head >
    < body >
    < /body >
    < html >

    calling konqueror browser with: "file:/svr/www/htdocs/x.html" opens two new
    windows F1 with system root and F2 with apache root/index
    calling konqueror browser with: "http://x.html" opens only one window ! why ?
    and how could i change it ? why did it work before an upgrade ?

    regards, zbyszek
    --
    http://zbyszek.evot.org


    ---------------------------------------------------------------------
    The official User-To-User support forum of the Apache HTTP Server Project.
    See <URL:http://httpd.apache.org/userslist.html> for more info.
    To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
    " from the digest: users-digest-unsubscribe@httpd.apache.org
    For additional commands, e-mail: users-help@httpd.apache.org



  6. Default Re: jscript won't open file://localhost

    Zbigniew Lisiecki wrote:
    > Here is once more my question: the file x.html has the following contents:
    >
    > < html >
    > < head >
    > < script language=JavaScript >
    > F1 = open("file:/");
    > F2 = open("http://localhost/");
    > < /script >
    > < /head >
    > < body >
    > < /body >
    > < html >
    >
    > calling konqueror browser with: "file:/svr/www/htdocs/x.html" opens two
    > new windows F1 with system root and F2 with apache root/index
    > calling konqueror browser with: "http://x.html" opens only one window !


    And that is F1, right?

    > why ? and how could i change it ? why did it work before an upgrade ?


    Have you listen to the people replying to you? Apache just deliver the file,
    nothing more; it is not responsible for what the client do with it. It is
    the JavaScript code that fails. Why, I don't know, and don't care. If you
    want help with this off-topic problem on this list, at least acknowledge
    that it is off-topic.

    If you also open the x.html through the file system, as you indicate, Apache
    isn't involved *at all*! You have stated that the F2 window (Apache's) opens
    just fine. If you remove the F2 = open(...) line, in what way do you
    conclude that Apache has *anything* to do with this?!

    I also doubt file:/path is a valid URI. I think that if you want the
    machine's local file system, you should use file:///path.

    Regards,
    Robert Andersson


    ---------------------------------------------------------------------
    The official User-To-User support forum of the Apache HTTP Server Project.
    See <URL:http://httpd.apache.org/userslist.html> for more info.
    To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
    " from the digest: users-digest-unsubscribe@httpd.apache.org
    For additional commands, e-mail: users-help@httpd.apache.org



  7. Default Re: jscript won't open file://localhost

    Zbigniew Lisiecki wrote:
    > calling konqueror browser with: "file:/svr/www/htdocs/x.html" opens two

    new
    > windows F1 with system root and F2 with apache root/index
    > calling konqueror browser with: "http://x.html" opens only one window !

    why ?
    > and how could i change it ? why did it work before an upgrade ?


    Sorry, I totally misread this part when I replied previously. Please forgive
    my perhaps rude response; my coffee isn't ready yet. I'll try to make a more
    relevant comment here.

    So, it works when you open the file through the filesystem, but not from
    Apache? Btw, how on earth can you open "http://x.html"?

    > in Apache 1.3.26 since a system upgrade to SuSE 8.1


    The upgrade only concerned the OS? Did it work before with Apache 1.3.26
    with the same config?

    Have you tried with a different browser? I haven't used Konqueror much, but
    if it has some JavaScript console, see if any errors/warnings are reported.

    All I can think of is that your browser somehow determine that the URI isn't
    valid, or that it somehow gets the implied host in "file:/" wrong when when
    reading x.html through HTTP. I can still not see how Apache could affect
    this, though. Could it not rather be related to the OS upgrade?

    Regards,
    Robert Andersson


    ---------------------------------------------------------------------
    The official User-To-User support forum of the Apache HTTP Server Project.
    See <URL:http://httpd.apache.org/userslist.html> for more info.
    To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
    " from the digest: users-digest-unsubscribe@httpd.apache.org
    For additional commands, e-mail: users-help@httpd.apache.org



+ Reply to Thread