Hi !
on my web site http://www.l2wh.com i use milonic menus (framed version) and everything works great .
If you select the 'FastSearch' item of the top menu of the site,you'll get a simple formular with a text field .
Now, I'm trying to set the focus to that text field when the menu is opened .
I tryed onfunction,clickfuntion with something similar to top.document.getelementbyid["q"].focus(); but that does not seems to work .
Any help is welcome .
Thanks !
Himred
Help required on setting focus on a menu form item
Hi,
This should do it
What you need to do is put this inside the framemenu.js file, probably best just before the search menu like this:
HTH,
Andy
This should do it
Code: Select all
function mmVisFunction(_mD,v){
if(_m[_mD][1]=="search")_d.forms['fs'].q.focus()
}
Code: Select all
function mmVisFunction(_mD,v){
if(_m[_mD][1]=="search")_d.forms['fs'].q.focus()
}
with(milonic=new menuname("search")){
style=SearchStyle;
margin=0;
border=0;
bordercolor="#331155";
aI("text=<FORM METHOD=GET ACTION=/woogle.php name=fs><table border=0 cellpadding=0 cellspacing=0 width=100%><tr><td align=center><b>Fast L2WH Search</b><br><br><input id=q name=q type=text><br><br><input type=submit value=Search></td></tr></table></form>>;type=form;align=center;onbgcolor=;onborder=;");
}
HTH,
Andy