hello…
my problem is i want to send the option data in confirm message of javascript from php.
my code is:
<select name=“to_id” id=“to_id”>
<option value=“0”>-----Select Employee------</option>
<option=“1”>Rashmita</option>
<option value=“2”>Sujit</option>
<option value=“3”>Itishree</option>
<option value=“4”>Mitali</option>
</select>
<script type=“text/javascript”>
function Confirm()
{
var start = document.forward_file.to_id.value;
var record=confirm("Are you sure you want to send this File to "+start+ “Person??”);
if(record == 1 && start == 0)
{
alert (‘Please select an Employee name’); return false;
}
if(record == 1)
{
return true;
}
else if(record == 0)
{
return false;
}
//else
}
</script>
In this confirm message var start shows the option value i.e. 1,2,3 etc. But, i want to show the name i.e. Rashmita, Sujjit, Mitali etc.
how can it solve, can anyone solve this…
plz its urgent…