views:

2394

answers:

5

This works on all other browsers...but fails on IE7 & IE8. Help Please!

<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<script src="/javascripts/prototype.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<input type="button" value="Ajax Test" onclick="var myAjax = new Ajax.Updater('TestContent', '/store/home', {method: 'post', parameters: 'foo=bar'});" />
<div id="TestContent" style="margin: 100px; border: 1px solid #F00; height: 500px;">
</div>
</body>
</html>
A: 

Syntax looks ok. Maybe the variable assignment isnt allowed or causing the variable to be deleted before its complete. Have you tried with creating the Updater in an external function?

Stefan Lundström
+1  A: 

removed all utf-8 references and suddenly IE decides to play ball. IE, even the brand new version 8, is years behind the other 3 (Firefox, Safari, Opera)... oh well.

i'll check the actual file encodings, and my headers/.htaccess to make sure there isn't a mismatch somewhere. very strange behavior. no errors in IE or anything, just nothing.
everything matches...so that wasn't the issue. time to dig into the debugger and start setting breakpoints. searching google, seems a lot of people are having similar issues with IE...oh well.
A: 

I have exactly the same issue! Have you found any solution yet? I can't deny utf8 support from my users! This is ridiculous!

A: 

I've been trying even with the newest prototype versions (1.6.1 rc3) and I can't make it work! This prototype version says "Fully compatible..." but I guess they haven't tested yet.

Please, if someone has a solution, workaround please, help me!

Thanks in advance!

A: 

I had a similar problem.

It turns out that in my case, the ajax response had a FORM element in it, and the destination of the updater was already inside a FORM element.

It worked fine in firefox, but not IE.

link text

Cameron Maxwell