Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
Hi,
The following code is a show/hide based on the options in a dropdown. I need to add to this.
I need to add if parseInt (num) == 4 then show div #4
but I can't seem to get it working. Any help would be greatly appreciated!
<script language="javascript">
$(document).ready(function(){
showHide($('select[name=newUserRoleID]').val());
});
function showHide(num)
{
var showDiv = "#"+parseInt(num);
$("div").hide();
if(parseInt (num) == 2 || parseInt(num)==3 ||parseInt(num)==5)
{
$("#3").show(); }
else
{
$(showDiv).show();
}
}
</script>
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19:
Sign up now to view this solution! It's quick, easy, and secure to subscribe. We will return you to this solution, unlocked, when you’re done.
Posted on 2011-05-10 at 06:53:22ID: 36812571
All comments and solutions are available to Premium Service Members only. Sign up to view the solution to this question. Already a member? Log in to view this solution.