I am doing Event Handling by Javascript
I want to use "onMouseOve r" command for filling up a form. I have made a "Dropdown List" in the Form. When a user ignore to select a city from "Dropdown List", I want that a "window.ale rt" "Please select your city".
I have done this but when I select a city, alert again comes. I want that after selection of city, there should be no alert again. My code is here:
I want to use "onMouseOve r" command for filling up a form. I have made a "Dropdown List" in the Form. When a user ignore to select a city from "Dropdown List", I want that a "window.ale rt" "Please select your city".
I have done this but when I select a city, alert again comes. I want that after selection of city, there should be no alert again. My code is here:
Code:
<SCRIPT>
function checkCityForm() {
if ((document.login.Address1.value.length > 0) && (document.login.from.selectedIndex == 0)) {
window.alert("Select your city Please");
}
}
</SCRIPT>
Comment