TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

text drop downs

Page: 1 Reply
Jul 20th 2002#59830 Report
Member since: Dec 24th 2001
Posts: 222
How do you create the text drop downs like when you click on one of the headers at this site
http://www.xra2x.com
I want to finish this part of my site so speed would be greatly appreciated
Reply with Quote Reply
Jul 21st 2002#60058 Report
Member since: Mar 24th 2002
Posts: 3114
*gives a bag of speed to riveroaks*

..why don´t you use a JavaScript to alter the contents of a div?
Example:
function openSubMenu()
{
subMenu.innerHTML="[the HTML goes in here]"
}
function closeSubMenu()
{
subMent.innerHTML=""
}

Then have a div underneath the link and name it with an "ID='subMenu'" ..that´s how I´d do it...
Reply with Quote Reply
Jul 21st 2002#60088 Report
Member since: Dec 24th 2001
Posts: 222
i actually went ahead and took it from the site i dont think there is any personal scripting in here this should be bar bones so if anyone else wants to use it heres the code i put in
<!--
function showhide(aax){
if (aax.style.display=='none'){
aax.style.display='';
}
else{
aax.style.display='none'
}
}
-->
thats the function and then you place your text that you want to have clicked to open the menu in between <span> tags with an id and an onclick trigger that activates the function with the name of the id for the links you want to pop out as a parameter or whatever goes in those paranthesis like this. The ID of course can be whatever you want and the onmouseover and onmouseout has nothing to do with this its just part of my site


<span id="ra2menu1" onClick="showhide(ra2units)" onMouseOver="turnwhite(ra2menu1)" onMouseOut="turnback(ra2menu1)" class="redtext" style="cursor:hand">-Units</span><br>
<span id="ra2units" style="display:'none'">
<a class="mouseover" href="">   Allied Units</a><br>
<a class="mouseover" href="">   Soviet Units</a><br></span>
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum