I have a set of radio buttons called pick_up_point. There are 3 options, and when you click on a parameter, a set of input fields related to the option will be displayed.
Now, by default, when the user clicks on a parameter, I run the change () function, which will run a function called clearInputFields, which, as you might guess, will clear any text entered in the input fields.
$("input[name='pick_up_point']").change(function()
{
clearInputFields();
});
Now I have tried to expand this so that the user is prompted for a prompt to inform them that the input fields will be cleared:
$("input[name='pick_up_point']").click(function(event)
{
if(confirm('Address details will be cleared. Continue?'))
{
return true;
}
else
{
return false;
}
});
The 'click' function is in front of the "change" function.
This works "OK" in Firefox and does not work properly in IE.
Firefox , "" .
IE , . "" , .
, , , - , , OK . "" , .