I'm using a validation script, and need some help. I have framed artwork, 7 sizes, 5 frame options. Howver the smallest size doesn't come framed. So I need to check they've picked a size, and a frame, unless the size they picked was the first option, then a frame isn't required. Here's what I've messed with so far
Code:
if (document.getElementById('po1701').selectedIndex == 0)
{ alert('Please select an art size.'); return false;
}
if (document.getElementById('po1701').selectedIndex == 1 & document.getElementById('po1746').selectedIndex != 0 )
{ alert('The smallest size of this image does not come framed, please un-select a frame option and try again. See our FAQ page for more information.'); return false;
}
if (document.getElementById('po1701').selectedIndex == 1 & document.getElementById('po1746').selectedIndex == 0 )
{ return true;
}
else if (document.getElementById('po1746').selectedIndex == 0)
{ alert('Please select a frame style for your item.'); return false;
}
else return true;