See this example to get an idea.
If you get stuck, post your code.
<form name="crmForm" method="post">
<input type="button" name="btnAdd" value="Add" onclick="AddRowMode()">
<input type="text" name="hdnCategoryCode" maxlength="20">
</form>
<script language="JavaScript">
AddRowMode(){
var varCurrentRow = document.crmForm.hdnCategoryCode;
if
if (varCurrentRow =="SIM") {
....
}else (varCurrentRow =="HANDSET"){
...
}
...
codes for appending in the table here.....
}
here are some of my codes,.
i already append the values in the tables, and everytime i add rows to the table I managed also to store the category in the hidden textfield called hdnCategoryCode, so i will no longer use the rows to compare. But now the problem is like this, when i click my add button the value of hdnCategoryCode and hdnPreviousValue are the same, i just want a script to store the previous value of the hdnCategoryCode to a variable, that will be retained even if i clicked the add button again the second time around..then then I can now compare the it with the current value of hdnCategoryCode.
thank you very much for time....
it was highly appreciated :-)