What is wrong with this code? I'm relatively new to Javascript, therefore, not very good at spotting why it does not work at times. Very grateful for any help.

I have a checkbox that, when checked, has a value of "Yes". If checked and form field "_013_currsite" is blank I want a prompt box to appear asking for "...current web site". I then want to assign the value of the prompt field to "_013_currsite".

In the checkbox input I have an onBlur event calling wwwPrompt.

At the moment, the onBlur calls the function. The value entered in the prompt assigns to "_013_currsite"; however, what the function does not seem to spot is when there is an entry in "_013_currsite" already (in which case I do not want the prompt to appear).

Any idea what's occuring here?

PHP Code:
function wwwPrompt(enquiryForm) {
    if (
enquiryForm._016_review_site.value=="Yes" && enquiryForm._013_currsite.value=="");
var 
www prompt("Please enter your current web site address.",""); {
    
enquiryForm._013_currsite.value=www; return false;
    }
enquiryForm._017_site_hosting.focus(); return true;