So....how do you set focus to a field? Everything I've tried doesn't work.
document.getElementById('DEPART_DT').focus(); (javascript)
digit.byId("DEPART_DT").focus(); (dojo)
$('#DEPART_DT').focus(); (jquery... yes I installed the files)
Tried each of these in the onblur and onchange events. Any help on this would be appreciated. Thanks.
document.getElementById('DEPART_DT').focus(); (javascript)
digit.byId("DEPART_DT").focus(); (dojo)
$('#DEPART_DT').focus(); (jquery... yes I installed the files)
Tried each of these in the onblur and onchange events. Any help on this would be appreciated. Thanks.
RE: Set focus to a field
The HTML markup in WebMaker varies depending on the type of control you are using and sometimes also varies depending on the container for the control.
What is the control you are using and does it reside within a particular type of group?
The following link contains a few useful documents outlining the basics of field layout and how to interact with them:
http://www.hyfinity.com/node/148
You can also use F12 on the browser to popup Developer Tools in IE or Firebug in Firefox, etc. to check the HMTL layout. This might provide extra clues for you.
Kind Regards
Abdul
RE: Set focus to a field
The techniques above are all OK in principle.
What type of field is 'DEPART_DT' e.g. radio or checkbox , or is it in a Repeat structure?
These aspects can effect the 'id' you would need to use.
Try using an 'onload' page event to see if that works?
RE: Set focus to a field
It's a date text box. I'm calling a function to validate the format. If it is incorrect, I want to return focus back to it. The HTML id is DEPART_DT. Nothing works. In fact, I can't set focus on ANY field in webmaker...ever. The focus call works fine in straight HTML, but not in webmaker. What should I be looking for.
Update: Works on a onload page event. Doesn't work in onchange or onblur events.
RE: Set focus to a field
dojo.query("input[name=expire_date]")[0].focus()
Not work either. Please let me know if you have resolved the issue
WM date field has a dojo datepicker. How do I access the datapicker object and set the datepicker to a specific date?