PDA

View Full Version : Help with this drop down


Brad
07-04-2002, 02:09 PM
its been naging me for days, i posted this at the vB.com template forum but after 72 views no one has replied with a working verson. so im hoping ill get one here. my deadline is in 2 days and i need this to work ;). i thought it might need a bit of code hacking so i dident post it in the template forum.

from my post at vB.com


somewhere in the postbit i added this:

<select>
<OPTION value="">$post[username]'s info.</option>
<OPTION value="">--------------</option>
<OPTION value="$post[profile]Profile</option>
<OPTION value="$post[pmlink]Pm User</option>
<OPTION value="$post[useremail]Email</option>
<OPTION value="$post[homepage]View Homepage</option>
<OPTION value="$post[search]Search</option>
<OPTION value="$post[buddy]Buddy</option>
<OPTION value="editpost.php?s=$session[sessionhash]&action=editpost&postid=$post[postid]">Edit</option>
<OPTION value="newreply.php?s=$session[sessionhash]&action=newreply&postid=$post[postid]">Quote</option>
</SELECT>

and this to the header template:

<script language="JavaScript1.2">
//reusable/////////////////////////////


var zindex=100
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
var opr=navigator.userAgent.indexOf("Opera")

function dropit(e,whichone){
curmenuID=ns6? document.getElementById(whichone).id : eval(whichone).id
if (window.themenu&&themenu.id!=curmenuID)
themenuStyle.visibility=ns4?"hide" : "hidden"

themenu=ns6? document.getElementById(whichone): eval(whichone)
themenuStyle=(ns6||ie4)? themenu.style : themenu

themenuoffsetX=(ie4&&opr==-1)? document.body.scrollLeft : 0
themenuoffsetY=(ie4&&opr==-1)? document.body.scrollTop : 0

themenuStyle.left=ns6||ns4? e.pageX-e.layerX : themenuoffsetX+event.clientX-event.offsetX
themenuStyle.top=ns6||ns4? e.pageY-e.layerY+19 : themenuoffsetY+event.clientY-event.offsetY+18

hiddenconst=(ns6||ie4)? "hidden" : "hide"
if (themenuStyle.visibility==hiddenconst){
themenuStyle.visibility=(ns6||ie4)? "visible" : "show"
themenuStyle.zIndex=zindex++
}
else
hidemenu()
return false
}

function hidemenu(){
if ((ie4||ns6)&&window.themenu)
themenuStyle.visibility="hidden"
else if (ns4)
themenu.visibility="hide"
}

if (ie4||ns6)
document.onclick=hidemenu

//reusable/////////////////////////////
</script>

This code was right out of my ubb templates (with a few changes to use vB's links of course :) ) and it always worked on ubb. where might i be making the error in my code?

g-force2k2
07-04-2002, 05:35 PM
Anime-loo i don't see how the heading code would help you in this instance... if you're looking to accomplish this effect then probably just make your own coding for it... i can make you something if needed ;)

Edit: Note on another hand should end your options:

<OPTION value="$post[profile]Profile</option>

should be:

<optioin value="$post[profile]">Profile</opton>

Also another note... is that i don't think you need the $post[profile] part because you're not looking to access other members profiles and stuff... besides it wouldn't work eitehr ways ;)

g-force2k2