Jump to content

[SOLVED] Very simple ajax call doesnt work in IE8


Slips

Recommended Posts

Hi,

Im trying a very simple ajax call , that sends one variable to a php file and gets an output. The script works flawlessly in Chrome2 and FF3.. I tried the following code as well as a $.ajax command, got the same result.

 

Basically heres whats going on:

 

Its a script to display respective cities of each country.

 

1 - User clicks on link which has the current countryname in the 'href' value.

 

3 - Container Displays results of the ajax call.

 

 

At first i was using a more complex version of the script below, then i started erasing lines to narrow in on my problem and now im stuck at this point.

 

Help is greatly appreciated.

 

 

 

<html>
  <head>
  <style type="text/css">
  	  #gallery_citylist_container /* Container with thick border*/
	  {
	  position:absolute;
	  top:200px;
	  border:4px solid #666666;
	  width:320px;
	  background-color:#FFFFFF;
	  }
  </style>
  
  <script type="text/javascript" src="jss/jquery.js"></script>
  <script type="text/javascript">
  $(document).ready(function(){
  
      $('#viewalllink').click(function(){
  											 var locationshort = $(this).attr('href');
											 $.get('ajax/gallerydisplaycities.php',{'location':locationshort},function(data){
                                                                                             $('#gallery_citylist_container').html(data);
                                                                                                     }); //MY AJAX CALL END
												  

											return false;
									});
							});													
</script>																			

  </head>

  
  <body>
  <div id="gallery_citylist_container">

  </div>
  
  <div><a id="viewalllink" href="france">Click</a></div>
  </body>


</html>

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.