Jump to content

Text box array in Jquery


sknagesh

Recommended Posts

Hi

 

I am loading contents from my Mysql table for editing using PHP and Ajax. The data is loaded on into to the page dynamically using Ajax. Each cell in a column is having unique name and id like tollower[1], tollower[2], tollower[3] etc in one column. Next column is having tolupper[1],tolupper[2],tolupper[3] etc. I am able to update the edited values back in the Mysql table by using serializeArry() and posting the values. The problem i am having is in client side validation of the edit. I want to do some live validation of values entered for tollower[1] in first column to tolupper[1] in second column etc. How do I do this using Jquery validationEngine.

 

Below is the HTML table as created by PHP.

 

 


	<input name="baloonno[0]" id="baloonno[0]" value="34.1" class="validate[required,custom[float]] text-input" type="text">
	</td><td>
	<input name="basicdimn[0]" id="basicdimn[0]" value="22" class="validate[required,custom[float]] text-input" type="text">
	</td><td>
	<input name="tollower[0]" id="tollower[0]" value="0.0000000000" type="text">
	</td><td>
	<input name="tolupper[0]" id="tolupper[0]" value="1.0000000000" type="text">
	</td><td>
	<select name="Instrument_ID[0]" id="Instrument_ID[0]">
		<option value="1" selected="Selected">"DEW-1-Digital Vernier</option><option value="2">"DEW-2-0-25mm Micrometer</option><option value="3">"DEW-50-Pin Gage Set</option>
	</select></td><td>
	<input name="textfield[0]" id="textfield[0]" value="1" checked="checked" type="radio">
	Yes
	<input name="textfield[0]" id="textfield[0]" value="0" type="radio">
	No</td><td>
	<input name="proddimn[0]" id="proddimn[0]" value="1" checked="checked" type="radio">
	Yes
	<input name="proddimn[0]" id="proddimn[0]" value="0" type="radio">
	No</td><td>
	<input name="deldimn[0]" id="deldimn[0]" value="1" type="checkbox">
	</td>
</tr>
<input name="InProcess_ID[0]" id="InProces_ID[0]" value="195" type="hidden">
<tr>
	<td>
	<input name="baloonno[1]" id="baloonno[1]" value="222" class="validate[required,custom[float]] text-input" type="text">
	</td><td>
	<input name="basicdimn[1]" id="basicdimn[1]" value="94.5" class="validate[required,custom[float]] text-input" type="text">
	</td><td>
	<input name="tollower[1]" id="tollower[1]" value="-0.1500000060" type="text">
	</td><td>
	<input name="tolupper[1]" id="tolupper[1]" value="0.1700000018" type="text">
	</td><td>
	<select name="Instrument_ID[1]" id="Instrument_ID[1]">
		<option value="1" selected="Selected">"DEW-1-Digital Vernier</option><option value="2">"DEW-2-0-25mm Micrometer</option><option value="3">"DEW-50-Pin Gage Set</option>
	</select></td><td>
	<input name="textfield[1]" id="textfield[1]" value="1" checked="checked" type="radio">
	Yes
	<input name="textfield[1]" id="textfield[1]" value="0" type="radio">
	No</td><td>
	<input name="proddimn[1]" id="proddimn[1]" value="1" checked="checked" type="radio">
	Yes
	<input name="proddimn[1]" id="proddimn[1]" value="0" type="radio">
	No</td><td>
	<input name="deldimn[1]" id="deldimn[1]" value="1" type="checkbox">
	</td>
</tr>
<input name="InProcess_ID[1]" id="InProces_ID[1]" value="194" type="hidden">
<tr>
	<td>
	<input name="baloonno[2]" id="baloonno[2]" value="22" class="validate[required,custom[float]] text-input" type="text">
	</td><td>
	<input name="basicdimn[2]" id="basicdimn[2]" value="10.5" class="validate[required,custom[float]] text-input" type="text">
	</td><td>
	<input name="tollower[2]" id="tollower[2]" value="0.0000000000" type="text">
	</td><td>
	<input name="tolupper[2]" id="tolupper[2]" value="0.1500000060" type="text">
	</td><td>
	<select name="Instrument_ID[2]" id="Instrument_ID[2]">
		<option value="1" selected="Selected">"DEW-1-Digital Vernier</option><option value="2">"DEW-2-0-25mm Micrometer</option><option value="3">"DEW-50-Pin Gage Set</option>
	</select></td><td>
	<input name="textfield[2]" id="textfield[2]" value="1" checked="checked" type="radio">
	Yes
	<input name="textfield[2]" id="textfield[2]" value="0" type="radio">
	No</td><td>
	<input name="proddimn[2]" id="proddimn[2]" value="1" checked="checked" type="radio">
	Yes
	<input name="proddimn[2]" id="proddimn[2]" value="0" type="radio">
	No</td><td>
	<input name="deldimn[2]" id="deldimn[2]" value="1" type="checkbox">
	</td>
</tr>
<input name="InProcess_ID[2]" id="InProces_ID[2]" value="193" type="hidden">



 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.