views:

592

answers:

3

The problem with onsubmit still continues when I even use preventDefault option. My problem is the same with Asp.net mvc beta ajax problem

<% using (this.Ajax.BeginForm("den2",
                              "Deneme",
                              null,
                              new AjaxOptions {
                                   UpdateTargetId = "panel1",
                                   InsertionMode=InsertionMode.Replace
                              },
                              new { id = "panelOneForm" })) { }  %>
<div class="panel" id="panel1">
   <img src="/Content/ajax-loader.gif" />
</div>
<script type="text/javascript">
   $get("panelOneForm").onsubmit({ preventDefault: function() { } });
</script>

This time I get the following error:

e.type is undefined
var etype = this.type = e.type.toLowerCase();

When I debug it :

 var e = Function._validateParams(arguments, [

 {name: "eventObject"} ]);

 if (e) throw e;

 var e = eventObject;

 var etype = this.type = e.type.toLowerCase();

 this.rawEvent = e;

 ...(function continues) at MicrosoftAjax.debug.js line 2862

Is there a way to solve it or should I pass each parameter property used in this method?

Thanks

A: 

I received similar error.

A: 

Same error here too.

Olivier PAYEN
+1  A: 

After some research, I found that was an issue with the RC version of MicrosoftAjax.js

It works fine if I use an older version of this file. Not a solution, but it will help temporarly.

Olivier PAYEN