I have an ajax.begin form in one of my views. When I add OnSuccess = (javascript function), in chrome and firefix, it opens a new window. All I am doing in the JS function is to remove a text from the field. In IE it works fine, it doesnt open a new window -
CODE -
<% using (Ajax.BeginForm("SendMessages", "Chat", new RouteValueDictionary(new { controller = "Chat", action = "SendMessages", id = Model.MeetingID }), new AjaxOptions { HttpMethod = "Post", UpdateTargetId = "Information" , OnSuccess="clearText"}))
{%>
$(function clearText() {
$( #SentMessage ).val("");
return false;
});
Could some one tell me what I am doing wrong or is it a problem with chrome and firefox ?