Page 1 of 1

Ajax problem on load

Posted: Thu May 26, 2011 4:14 pm
by fabby
So, i want to make a banner like google adds, so, on a link to generate the banner, and with ajax, to get the content and show it on any website.

So, the code to show the banner is:

Code: Select all

<script type="text/javascript" language="javascript" src="http://localhost/asreplica/include/show_banner.js"></script>
<script>show_banner_content();</script>
<div id="msg_err_rapid_login">da</div>
the function is

Code: Select all

function show_banner_content(){
	id_camp_err='msg_err_rapid_login';
	
	xmlHttp=GetXmlHttpObject();
	xmlHttp.open('post','http://localhost/asreplica/banner.php');
	xmlHttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	xmlHttp.onreadystatechange=insertError;
	xmlHttp.send('submit_form=da');
	}
and the banner.php just shows the banner and have a script that move up and show other products, like a carousel.

the problem is, that when i acces the site that has the banner, it not shows the movement.
when i acces directly the file, banner.php, all is ok.

When i aces with mozilla firebug the banner, for example at this code:
<script src="include/slides.min.jquery.js" type="text/javascript"></script> the error is:
Failed to load source for: http://localhost/asreplica//include/sli ... .jquery.js

But like i said before, if i acces the file banner.php directly, all is ok.
So...do you know why i can include javascript files?
Thanks!

Re: Ajax problem on load

Posted: Thu Jun 02, 2011 10:13 am
by Jade
You have two backslashes in your jquery path that may be causing the problem: asreplica//include