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

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Alec
Advanced
Advanced
Posts: 19
Joined: Fri Feb 15, 2008 11:52 am

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

Post by Alec »

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: Select all

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 ?
Alec
Advanced
Advanced
Posts: 19
Joined: Fri Feb 15, 2008 11:52 am

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

Post by Alec »

Think I cracked it ;)

Code: Select all

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
Post Reply