Hi I'm new to javascript and trying to solve what to some of you guys may be very simple but I just can't seem to resolve it.
Using the Complex form as a template I want to make a small change. I've added the script below to help explain what I'm trying to do.
Basically all I want is to set different values to each of the tours. Currently if you select say Bulgaria Tour 1, 2 or 3 they all give the same value (500). How do I change it so if you select Tour 2 or 3 they have different values.
Any help would be much appreciated.
Thanks
function add_item(id,val,_obj) {
tmp=document.createElement("OPTION");
tmp.value=id;
tmp.text=val;
_obj.options.add(tmp);
}
function country_change(field) {
if (field.selectedIndex==0) {
while ({%id28}.options.length>0) {%id28}.remove(0);
add_item(0,'-- Please select --',{%id28});
add_item(1,'Bulgaria- tour 1',{%id28});
add_item(2,'Bulgaria- tour 2',{%id28});
add_item(3,'Bulgaria- tour 3',{%id28});
{%id31}.value='500';
} else