Bug Tracker

Modify

Ticket #2201 (closed bug: worksforme)

Opened 5 years ago

Last modified 5 years ago

$.get() in IE6 & IE7

Reported by: MWK Owned by:
Priority: major Milestone: 1.2.3
Component: ajax Version: 1.2.2
Keywords: Ajax $.get() Cc:
Blocking: Blocked by:

Description

I encounter problems with the $.get() method in IE. in FF everything seems to be fine.

Testfile

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!--meta -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15" />
<script type="application/javascript" src="jquery.js"></script>
</head>

<body>
<div id="trace">

</div>
<script type="text/javascript">
<!--
$(document).ready(function()
{
	$.get("replyget.test.php5", {id:'Hola'}, function(html)
	{
		//alert(html);
		$('#trace').html(html);
	});
});

//-->
</script>
</body>
</html>

reply file

<?php
	echo "Relpy<br />";
	echo ('<pre>');
	print_r($_REQUEST);
	echo ('</pre>');

?>

In IE nothing happens. It keeps the page blank. In FF everything works fine.

Change History

comment:1 Changed 5 years ago by davidserduke

  • Status changed from new to closed
  • Resolution set to worksforme
  • Component changed from core to ajax

I didn't know this either, but apparently IE doesn't like type="application/javascript".

Changing the jquery.js line to

<script type="text/javascript" src="jquery.js"></script>

fixed the test case for me.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.