Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:22

onfocus='Select();' possible in forms ?


Poster: Alec
Dated: Friday February 15 2008 - 14:39:26 GMT

Hi

Just trying to find out if its possible to use onfocus='Select();' in forms ? As I can't seem to figure it out...

Code:
with(milonic=new menuname("Search")){
openstyle="up";
style=submenuStyle;
aI("text='<INPUT id=txtWhere type=text name=txtWhere value='Enter Postcode or Place'><INPUT id=find type=button value=Find name=find onclick=FindLoc3();>';type=form;offbgcolor=#FFFCF3;");
}


Works just fine, however when I try this code...

with(milonic=new menuname("Search")){
openstyle="up";
style=submenuStyle;
aI("text='<INPUT id=txtWhere type=text name=txtWhere value='Enter Postcode or Place' onfocus='select();'><INPUT id=find type=button value=Find name=find onclick=FindLoc3();>';type=form;offbgcolor=#FFFCF3;");
}

It all goes pete tong :(

Can this be done ?

Re: onfocus='Select();' possible in forms ?


Poster: Alec
Dated: Friday February 15 2008 - 14:49:44 GMT

Think I cracked it ;)

Code:
with(milonic=new menuname("Search")){
openstyle="up";
style=submenuStyle;
aI("text='<INPUT id=txtWhere type=text name=txtWhere value='Enter Postcode or Place' onfocus='this.select()'><INPUT id=find type=button value=Find name=find onclick=FindLoc3();>';type=form;offbgcolor=#FFFCF3;");
}


:D