Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: forcing selection of the calendar text field with javascript
adam_lipscombe
Junior Member

Posts: 4
Registered: 5/3/2005
Location: uk
Member Is Offline
posted on 5/16/2006 at 10:49 AM Reply With Quote
forcing selection of the calendar text field with javascript


How can I select the calendar text field with javascript?

the normal approach of
document.forms[0].<fieldName>.select();
does not seem to work.



I have version 2.1.15

Version: 2.1.15 (modal mode)
Date: 04/15/2005 (mm/dd/yyyy)
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 5/17/2006 at 10:09 AM Reply With Quote

do you want to move the cursor to the input box? Then you should use .focus() method.
View User's Profile View All Posts By User U2U Member
adam_lipscombe
Junior Member

Posts: 4
Registered: 5/3/2005
Location: uk
Member Is Offline
posted on 5/17/2006 at 10:26 AM Reply With Quote

thanks.

I tried that but it doesnt seem to work either.

What i want to do is to hightlight all the text in the date field so user can type something else.

select() and focus() dont seem to behave as they would do with "normal" text fields.
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 5/17/2006 at 10:38 AM Reply With Quote

the calendar uses the standard <input type="text"> element. You probably run the code before that element is actually created by the calendar. You can run it later or attach the calendar to static (preexisting) input box.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Popup Calendar
Onpage Calendar
Modal Calendar
Product Documentation Documentation
Documenation Page
Change Log
Support Forum Technical Support
Support Forum
Customer Care System
Order Now ORDER NOW!
Add to Cart
View Cart
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004