M
Michal Jedryka
Hi All!
I'm trying to use jquery.
I need communicate with the server.
On the server, I wrote a test script (http://dwa.jedryka.com/
drop.html)
which returns the key and value specified by GET method (eg
http://dwa.jedryka.com/drop.html/?alfa=beta)
If not given anything, it returns only one word: "gowno".
Well, now I try to load the Ajax:
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="js/jquery-1.5.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".good").click(function(){
$("#result").load('http://dwa.jedryka.com/drop.html/');
return false;
});
});
</script>
</head>
<body>
<h1>ajax</h1>
<a href="#" class="good">Wyślij żądanie Ajax</a><br />
<p id="result"></p>
</body>
</html>
It does not work. It sends request to the server (I can see it in
server logs) but it does not load the response of the server to the
tag #result.
What's more - and it kills me the most - if I give (as argument of the
"load()" function) the url which is a static file such as
http://vps.jedryka.com/test.html - it works!
I tried also $.get and $.post - unfortunately with the same effect ...
Thank you in advance for your help
Where to find them?
Greetings
Michael Jędryka
Similarly, when I try send request with GET data:
I'm trying to use jquery.
I need communicate with the server.
On the server, I wrote a test script (http://dwa.jedryka.com/
drop.html)
which returns the key and value specified by GET method (eg
http://dwa.jedryka.com/drop.html/?alfa=beta)
If not given anything, it returns only one word: "gowno".
Well, now I try to load the Ajax:
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<script type="text/javascript" src="js/jquery-1.5.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".good").click(function(){
$("#result").load('http://dwa.jedryka.com/drop.html/');
return false;
});
});
</script>
</head>
<body>
<h1>ajax</h1>
<a href="#" class="good">Wyślij żądanie Ajax</a><br />
<p id="result"></p>
</body>
</html>
It does not work. It sends request to the server (I can see it in
server logs) but it does not load the response of the server to the
tag #result.
What's more - and it kills me the most - if I give (as argument of the
"load()" function) the url which is a static file such as
http://vps.jedryka.com/test.html - it works!
I tried also $.get and $.post - unfortunately with the same effect ...
Thank you in advance for your help
Where to find them?
Greetings
Michael Jędryka
Similarly, when I try send request with GET data: