PDA

View Full Version : drop down counter is not working


ksridhar69
10-09-2002, 09:05 PM
I want to submit the form 2nd time. That means when user select the value from drop down first time I don’t want to submit the form. But when user selects second time I want to submit the form. Is it possible. I am using this following code




function Changethepatientidinthispage()
{

for (var counter = 0; counter <= 1; counter++)
{
if (confirm("Do you want to Change The patient ID"))
{
document.patientidchage.deletethevalues.value = "delete";
window.document.testform.action = "cash_app_test.asp"
window.document.testform.submit();
}
if (counter <= 1)
break;
}
}



<select name="patient_id_code" size="1" onchange="Changethepatientidinthispage()">

<option value = "01">01-CLAIM NUMBER</option>

<option value = "02">02-;POLICY NUMBER</option>

<option value = "03">03-SSN</option>

<option value = "04">04-FILE NUMBER</option>

<option value = "05">05-CASE NUMBER</option>

</select>

ShriekForth
10-09-2002, 09:24 PM
This this..

counter = 0;

function Changethepatientidinthispage(){
counter ++;
if (counter > 1)
if (confirm("Do you want to Change The patient ID")){
document.patientidchage.deletethevalues.value = "delete";
window.document.testform.action = "cash_app_test.asp"
window.document.testform.submit();
}
}
this will prompt the user the second time they change the selection, and any time after that. Is that what you were looking for?

ShriekForth

ksridhar69
10-09-2002, 09:42 PM
Thanks it is working