jQuery ajax problem

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:
 
M

Michal Jedryka

If your page is on abc.jedryka.com and you're trying to load() content
from dwa.jedryka.com it's not going to work - depending on the browser,
at least.

Thank you very much!

Greetings

MJ
 

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

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top