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>

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.