below is my html form and i dont get any error if i dont have a <form tag, so i add a form tag like this:
<form class="cmxform" id="commentForm" method="post" action="">
get this error:
Microsoft JScript runtime error: 'first_name' is undefined
when i try to read the value of a text box:
First Name:
<input id="first_name" class=" text hasCorners required" maxlength="200"
name="first_name" />
function PostData() {
var _firstName = first_name.value;
......
......
$(document).ready(function () {
$('#btnRegister').click(function () {
PostData();
});
Try: