Code: Select all
<script>
function updateSelect(obj){
div = document.getElementById("salt");
if(obj.options[obj.selectedIndex].value == "PLEASE PAINT"){
if(div.style.display == "none")
div.style.display = "inline";
}else{
div.style.display = "none";
document.getElementById("salti").value = "";
}
div = document.getElementById("short");
if(obj.options[obj.selectedIndex].value == "SHORT"){
if(div.style.display == "none")
div.style.display = "inline";
}else{
div.style.display = "none";
document.getElementById("salti").value = "";
}
}
</script>
-
-
-
-
-
echo "
<select name='itemname2' onchange=\"updateSelect(this)\">
<option value='0'>PLEASE SELECT</option>
<option value='SHORT'>SHORT</option>
<option value='MEMBER'>SITE MEMBER</option>
<option value='PLEASE PAINT'>PLEASE PAINT</option>
</select>
<div id='salt' style='display:none; font-size: 12px'><div class='usercommentsform' style='margin-top: 0px; margin-bottom: 4px; background-color: #ffffff;'>
text will be here for paint</div>
</div></div>
<div id='short' style='display:none; font-size: 12px'>
<div class='usercommentsform' style='margin-top: 0px; margin-bottom: 4px; background-color: #ffffff; background-image: url(/images/bg_paintedprice.png); background-repeat: repeat-x;'>
text will be here for short
</div>
</div>
I am sure it is how I am using the salt word, in the SCRIPT at the top. Any ideas?