hello all
lets say i have a drop down list (its name = typeddl) with 2 item House and Car
and i have another drop down list for car model and another one for house type
now what i want is: when i choose House from the 1st dropdwon list , hide the cars model drop down list and show the house type drop down list…
i tried this below but didnt work
export function typeddl_change(event, $w) {
//Add your code for this event here:
if ( this .value === ‘1’)
{
$w(‘#carddl’).show(‘’);
$w(‘#houseddl’).hide(‘’);
} else
{
$w(‘#carddl’).hide(‘’);
$w(‘#yearddl’).show(‘’);
}
}
Thanks a lot for reply
i already used cascading to filter my second drop down list ,
but my design requires to hide the drop down completely
for example if i choose car in the first drop down i need 3 drop down lists , one for year , one for make and one for model… but when i choose house i need one dropdown list for type of houses …
i hope you got me …
many thanks
aha sorry for misunderstanding , i have a copy of my actual site, in order to do the tests and migrate it when its success ,
here is the site where im doing the test on it
I found the following code on your CarsModel page:
export function typeddl_change(event, $w) {
//Add your code for this event here:
if ($w(this).val() === "1") {
$w('#yearddl').show();
} else {
$w('#yearddl').hide();
}
}
This is not valid Wix Code and simply will not work. You will need to rewrite it in valid Wix Code as I showed in a previous post.
yes, its working thanks a lot , but the thing i dont get it …
if the selection = house , it suppose to hide the year ddl ( the first part of if should work ) but it work the other way