This javascript code was written for a drop down menu, but i cannot figgure out how to duplicate it so i can have a 2nd drop down with different messurments. please help?
function enlarge(id)
{document.getElementById(id).style.height = '220px';}
function shrink(id)
{document.getElementById(id).style.height = '130px';}
function toggle(id)
{if(document.getElementById(id).style.height == "130px")
{document.getElementById(id).style.height = "220px";}
else{document.getElementById(id).style.height = "130px";}}
the code works fine, but i need to have an almost identicle block of code only with different messurements. because the 2nd drop down menu is smaller.
function enlarge(id,newheight,oldheight)
{document.getElementById(id).style.height = newheight;}
function shrink(id)
{document.getElementById(id).style.height = oldheight;}
function toggle(id)
{if(document.getElementById(id).style.height == oldheight)
{document.getElementById(id).style.height = newheight;}
else{document.getElementById(id).style.height = oldheight;}}
Then make each call also include the newheight and the oldheight values, e.g.,
<a href="javascript:enlarge('foo','220','130')">menu option</a>
North America
Europe, Middle East and Africa
Asia Pacific