Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

country drop down list


fangSq

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...