fangSq Posted September 11, 2007 Posted September 11, 2007 i need to have some validation in the country drop down list during user registration. Like when the user select 'Singapore', i would like to hide away the suburb and city text field. i have try to edit the html_output.html by adding this: $parameters = 'onChange="hideField(this.options[this.selectedIndex].value);'; and in general.js function hidefield(country){ if(country=="188"){ showDiv0 = document.getElementById("show0"); showDiv0.style.display="none"; showDiv1 = document.getElementById("show0"); showDiv1.style.display="none"; } } but is does not work. There is no error in the page itself when browse using IE. how should i do it? thanks
Nullachtfuffzehn Posted September 11, 2007 Posted September 11, 2007 Best guess is always to try such things in firefox, cause the javascript console there is much more informational than the one in IE. Other than that, did you try to add an alert before the if statement to see which value is passed over to the function?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.