Hi,
I have a drop down list using Select and option tag in HTML.
When some one change the selection in the drop down list, I want give them a warning the selection has been changed, Are you Sure, If they select Ok the change should happen but it they select cancel the change should not happend.
I tried the following code on "onchange=return changestatus();" event of the select but it gives the warning message but it will still retain the new selected value no matter what button u pressed. How I can achive this via javascript?
function changestatus()
{
result = false;
res = confirm ("Are you sure to change the order status!")
if ( res == true )
result= true;
return result;
}
I have a drop down list using Select and option tag in HTML.
When some one change the selection in the drop down list, I want give them a warning the selection has been changed, Are you Sure, If they select Ok the change should happen but it they select cancel the change should not happend.
I tried the following code on "onchange=return changestatus();" event of the select but it gives the warning message but it will still retain the new selected value no matter what button u pressed. How I can achive this via javascript?
function changestatus()
{
result = false;
res = confirm ("Are you sure to change the order status!")
if ( res == true )
result= true;
return result;
}