Using jquery, I want to post data to from one of my pages to another one. By looking at examples, I coded something. Problem here, I get the following error.
Error: $(document.getElementsByName("signup")).Click is not a function Source File: http://sabahtan.com/ak/ Line: 18
$(document).ready(function() {
$(document.getElementsByName("signup")).Click(function() {
$.ajax({
type: "POST",
data: { PROCESS: "Add2Member", FIRSTNAME: $(document.getElementsByName("FIRSTNAME")).val(), LASTNAME: $(document.getElementsByName("LASTNAME")).val(), EMAILADDRESS: $(document.getElementsByName("EMAILADDRESS")).val(), PASSWORD: $(document.getElementsByName("PASSWORD")).val(), CITY: $(document.getElementsByName("CITY")).val() },
url: "default.cs.asp",
success: function(output) {
$("#SIGNUPFORM").html(output);
}
});
});
});
<form method="post" action="default.cs.asp?Process=Add2Member" id="SIGNUPFORM">
<fieldset>
<p>
<label>Adınız</label>
<input type="text" name="FIRSTNAME" />
<small><%=err_FIRSTNAME%></small>
</p>
<p>
<label>Soyadınz</label>
<input type="text" name="LASTNAME" />
<small><%=err_LASTNAME%></small>
</p>
<p>
<label>E-posta Adresiniz</label>
<input type="text" name="EMAILADDRESS" />
<small><%=err_EMAILADDRESS%></small>
</p>
<p>
<label>Şifreniz</label>
<input type="text" name="PASSWORD" />
<small><%=err_PASSWORD%></small>
</p>
<p>
<label>Yaşadığınız Yer</label>
<input type="text" name="CITY" />
<small><%=err_CITY%></small>
</p>
<p>
<input type="submit" name="signup" value="Kaydol" class="signup">
</p>
</fieldset>
</form>