manashi_130582
03-28-2006, 07:08 AM
hi
i hav created 3 buttons
MORE - is should generate a text box and combo box everytime it is clicked
FEWER-is should delete a text box and combo box everytime it is clicked
SHORTLIST- it should display the resul into anothe page
I hav used JAVASCRIPT...
The code is as follows :-
function addRow(frmCriteria)
{
var tmp = frmCriteria.sub_cnt.value;
tmp++;
frmCriteria.sub_cnt.value = tmp;
frmCriteria.action = "shortlist_by_cutoff.php?group="+frmCriteria.grp_id.value;
}
function removeRow(frmCriteria)
{
if( frmCriteria.sub_cnt.value > 1)
{
var tmp = frmCriteria.sub_cnt.value;
tmp--;
frmCriteria.sub_cnt.value = tmp;
frmCriteria.action = "shortlist_by_cutoff.php?group="+frmCriteria.grp_id.value;
}
else
{
return false;
}
}
the code inside form tag :-
<form name="criteria_frm" action="shortlist_cutoff_act.php?group=$group" method="POST">
<input type="hidden" name="grp_id" value="<?php echo $group;?>">
**<input type="hidden" name="sub_cnt" value= ??> //it takes the value of tmp(javascripts) but i dnt knw how to sho the value
<input type="submit" onclick="return addRow(document.criteria_frm)" value="More">
<input type="submit" onclick="return removeRow(document.criteria_frm)" value="Fewer">
<input type="submit" value="Shortlist" onclick="return DoSubmit(document.criteria_frm)">
when i am executin is not giving desired result... :confused: :(
waitin for the reply.... :)
i hav created 3 buttons
MORE - is should generate a text box and combo box everytime it is clicked
FEWER-is should delete a text box and combo box everytime it is clicked
SHORTLIST- it should display the resul into anothe page
I hav used JAVASCRIPT...
The code is as follows :-
function addRow(frmCriteria)
{
var tmp = frmCriteria.sub_cnt.value;
tmp++;
frmCriteria.sub_cnt.value = tmp;
frmCriteria.action = "shortlist_by_cutoff.php?group="+frmCriteria.grp_id.value;
}
function removeRow(frmCriteria)
{
if( frmCriteria.sub_cnt.value > 1)
{
var tmp = frmCriteria.sub_cnt.value;
tmp--;
frmCriteria.sub_cnt.value = tmp;
frmCriteria.action = "shortlist_by_cutoff.php?group="+frmCriteria.grp_id.value;
}
else
{
return false;
}
}
the code inside form tag :-
<form name="criteria_frm" action="shortlist_cutoff_act.php?group=$group" method="POST">
<input type="hidden" name="grp_id" value="<?php echo $group;?>">
**<input type="hidden" name="sub_cnt" value= ??> //it takes the value of tmp(javascripts) but i dnt knw how to sho the value
<input type="submit" onclick="return addRow(document.criteria_frm)" value="More">
<input type="submit" onclick="return removeRow(document.criteria_frm)" value="Fewer">
<input type="submit" value="Shortlist" onclick="return DoSubmit(document.criteria_frm)">
when i am executin is not giving desired result... :confused: :(
waitin for the reply.... :)