Jquery Ajax call only fires once after that if i click on the button it does return the last returned reponse but doesn't go the ajax function in c# Here is my aspx code
<asp:ImageButton ID="iBtnSaveUser" runat="server" OnClientClick="return ValidateForm();" />
Here is my jquery Ajax function
function ValidateForm() {
if ($(txtName).val() == "") {
alert('Name Required');
return false;
}
else if ($(txtUserName).val() == "") {
alert('UserName Required');
return false;
}
else if ($(txtPassword).val() == "") {
alert('Password Required');
return false;
}
else if ($(txtEmail).val() == "") {
alert('Email Required');
return false;
}
else if ($(txtPhone).val() == "") {
alert('Phone Number Required');
return false;
}
else if ($(ddlProfile).val() == "") {
alert('Profile Required');
return false;
}
AddUser();
return false;
}
function AddUser() {
var name = $(txtName).val();
var userName = $(txtUserName).val();
var password = $(txtPassword).val();
var email = $(txtEmail).val();
var phone = $(txtPhone).val();
var profile = $(ddlProfile).val();
$.ajax({
type: "GET",
url: ajaxCallHandlerUrl,
data: { OpCode: "AddUser", Params: "Name^" + name + "~UserName^" + userName + "~Email^" + email + "~Phone^" + phone + "~Profile^" + profile +"~Password^"+password },
dataType: "",
success: function (responseString) {
alert(responseString);
}
});
}
Try turning off caching:
$.ajax({
cache: false,
type: "GET",
/* other params... */
});
to keep things simple, I have jquery autocomplete working, what is the best way to approach, joining/displaying a multiple rows from the array in the same input field. My php looks like this $...
to keep things simple, I have jquery autocomplete working, what is the best way to approach, joining/displaying a multiple rows from the array in the same input field. My php looks like this $...
I know this can't be that difficult; maybe I'm going about this the wrong way. Hopefully you can help me. I have a website that needs to be able to post a string to someone's Facebook timeline. I've ...
I know this can't be that difficult; maybe I'm going about this the wrong way. Hopefully you can help me. I have a website that needs to be able to post a string to someone's Facebook timeline. I've ...
I have been using this, although I did not realize it was functioning improperly in ie8 until recently. $(window).blur(function () { alert("lost"); }); In firefox or chrome or safari, this properly ...
I have been using this, although I did not realize it was functioning improperly in ie8 until recently. $(window).blur(function () { alert("lost"); }); In firefox or chrome or safari, this properly ...
I'm working with jPlayer directly since the mp3-jplayer plugin for WordPress broke with the WP 3.5 update, and it seems to be abandoned by the developer. One of the nice features of the plugin is ...
I'm working with jPlayer directly since the mp3-jplayer plugin for WordPress broke with the WP 3.5 update, and it seems to be abandoned by the developer. One of the nice features of the plugin is ...