andresasongko 0 Newbie Poster

Does any of you have experience with Prototype.js? I need an expert here.

I want to submit a form using ajax.updater. The codes (I only show the relevant codes) are following:

<div id="result_from_submitting"></div>
<div id="space" style="display:none"><br></div>
<form id="f_profile_personal" onsubmit="SubmitForm(this); return false;" method="post"> 
...
</form>
<script type="text/javascript">
SubmitForm = function(form)
  {
    var container = 'result_from_submitting';
    var url = 'ajax_functions/ma_home.php';
    var params = Form.serialize(form, false);
    
    new Ajax.Updater(container,url,{method: 'post', parameters: params, evalScripts:true,
                        onLoading: function() {$(container).update('<img src="images/loading.gif"')},
                        onComplete: function() {Element.show('space')}
                    });
  }
</script>

The script ajax_functions/ma_home.php updates the database and gives a message, whether it is successful or not. It works great on Firefox. On IE7, it updates the database just fine but it doesn't give the message back on the container (div result_from_submitting).

For testing purpose, I've done these two:

(1)
I have put the following code under the SubmitForm function:

$(container).innerHTML = "HELLO";

This value shows up on the div container.

(2)
I created a simple PHP file (called ajaxtest.php), only with echo "hello world"; in it, and replace var url = "ajaxtest.php" under the SubmitForm function.

This value doesn't show up on the div container.

That's why I come to a conclusion that something is not right on ajax.updater for IE7.

Can someone please help me?