problem running a page containing remote link

Problems with the Windows version of XAMPP, questions, comments, and anything related.

problem running a page containing remote link

Postby betti.pome » 28. March 2011 14:24

Hi everybody.
I’m very newbie of everything concerns servers, but I need to develop a PHP website and I need to try I before release. So I choose XAMPP for install Apache + PHP. Everything went good.
Now I have a problem when I try to run a local web page (simple html) that contains links to remote javascript and CSS. My page is trying to use JQuery code, from JQuery site, following this very simple example:

Code: Select all
<html>
<head>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
  <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/demo/main.css" type="text/css" />
  <link rel="stylesheet" href="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.css" type="text/css" />
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.bgiframe.min.js"></script>
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.dimensions.js"></script>
  <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/autocomplete/jquery.autocomplete.js"></script>
  <script>
  $(document).ready(function(){
    var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
$("#example").autocomplete(data);
  });
  </script>
</head>
<body>
  Esempio: <input id="example" />
</body>
</html>


When I try to run my page from localhost:
http://localhost/prova/prova.htlm
I have neither css nor js files associated. So the function autocomplete doesn’t work.
If I simply use my browser, running:
F:\xampp\htdocs\web\prova\prova.htlm
I don’t have any problem.
Could anybody help me?
I apologize in advance if I asked something already known, but I’ve searched for so long, obtaining non results.
Thank you very much.
Betty
betti.pome
 
Posts: 3
Joined: 28. March 2011 13:07

Re: problem running a page containing remote link

Postby WilliL » 28. March 2011 16:32

betti.pome wrote:When I try to run my page from localhost:
http://localhost/prova/prova.htlm
I have neither css nor js files associated. So the function autocomplete doesn’t work.
If I simply use my browser, running:
F:\xampp\htdocs\web\prova\prova.htlm

usually x:\xampp\htdocs\ is your docuument root. Did you change settings in xampp configs?

Please try http://localhost/web/prova/prova.htlm
Willi
WilliL
 
Posts: 660
Joined: 08. January 2010 10:54
Operating System: Win7Home Prem 64 SP1

Re: problem running a page containing remote link

Postby betti.pome » 28. March 2011 20:22

Sorry.
I did a mistake writing my post. I run from
http://localhost/web/prova/prova.htlm
and I have no css and js from JQuery site.
Thank you
Betty
betti.pome
 
Posts: 3
Joined: 28. March 2011 13:07

Re: problem running a page containing remote link

Postby betti.pome » 29. March 2011 18:16

I don't think the problem is in HTML code.
Indeed if I copy JQuery scripts and css under my site folder (in a subfolder) and I refer to that local resources in my page the scripts work perfectly. When I try to edit inside the input field autocompletion happens because it use autocomplete code associated with input field via script code piece:
Code: Select all
<script>
        $(document).ready(function(){
       var data = "Core Selectors Attributes Traversing Manipulation CSS Events Effects Ajax Utilities".split(" ");
   $("#example").autocomplete(data);
       });
</script>


Another point is that when I run the page under localhost I don't see the body font format coming from http://dev.jquery.com/view/trunk/plugin ... o/main.css
that should format label "Esempio" with Arial.
So even if I don't consider autocomplete script I have the problem that my page doesn't load remote css.

My husband suggest it could be a firewall problem, so we disabled it and restart apache, but with no result.
The strange thing is that when I use local resource the access.log under apache logs shows this stack

127.0.0.1 - - [29/Mar/2007:18:11:51 +0200] "GET /web/prova_auto/prova.html HTTP/1.1" 200 1181 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 GTB7.1"
127.0.0.1 - - [29/Mar/2007:18:11:52 +0200] "GET /web/prova_auto/jquery/jquery.autocomplete.css HTTP/1.1" 200 797 "http://localhost/web/prova_auto/prova.html" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 GTB7.1"
127.0.0.1 - - [29/Mar/2007:18:11:52 +0200] "GET /web/prova_auto/jquery/lib/jquery.bgiframe.min.js HTTP/1.1" 200 1402 "http://localhost/web/prova_auto/prova.html" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 GTB7.1"
127.0.0.1 - - [29/Mar/2007:18:11:52 +0200] "GET /web/prova_auto/jquery/jquery.autocomplete.js HTTP/1.1" 200 19825 "http://localhost/web/prova_auto/prova.html" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 GTB7.1"
127.0.0.1 - - [29/Mar/2007:18:11:52 +0200] "GET /web/prova_auto/jquery/lib/jquery.dimensions.js HTTP/1.1" 404 1306 "http://localhost/web/prova_auto/prova.html" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 GTB7.1"

Whether if I run a page that should load remote resources the stack is:

127.0.0.1 - - [29/Mar/2007:18:28:19 +0200] "GET /web/prova_auto/prova_old.html HTTP/1.1" 200 1002 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 GTB7.1"

And no more: there is no GET for js or css.
I have Norton antivirus installed: should it be a problem?
For the moment I can resolve the problem importing source code, but I'll prefer linking remote resources.
Many thanks to everybody that can help.

Betty
betti.pome
 
Posts: 3
Joined: 28. March 2011 13:07


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 156 guests