Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
Ptonka

Avatar / Picture

Veteran
Registered:
Posts: 147
Reply with quote  #1 
Hello,

my problem is to set a focus on another textfield after selecting an Option in a DropDown-Feld.
It is'nt possible to set a focus on another field?
I use a Dropdown with 8 Options and after a select i want to set the focus on the (next) textfield.
Any ideas?

Ptonka
0
BMellert

Guru
Registered:
Posts: 688
Reply with quote  #2 

Metastorm only supports on field entry (OnFocus) and field exit (OnBlur) events for enter-able fields.  Since there's no OnClick or other client side triggers, I don't believe there's much of a way to set focus on change.  Others will correct me if I'm wrong.

0
mohnshine

Avatar / Picture

Senior Veteran
Registered:
Posts: 270
Reply with quote  #3 
The following function sets the onchange event for a dropdown.  You need to pass in the ID of the dropdown (usually the field name prefixed with an 'e') and the code to execute.
 
function SetDdOnChange(DdId, CodeString)
{
document.getElementById(DdId).onchange=function(){eval(CodeString);eworkData.OnChange(this);};
}

 
For your problem the following code should be what you need to add to your form load client code.  Replace MyDD with the ID of the dropdown.  Then replace FocusFieldID with the ID of the field you want to focus on.  Keep the single or double quotes when you enter the ID's.
 
SetDDLOnChange('MyDD','document.getElementById("FocusFieldID").focus()'):

__________________
Your best practice does not conform with my best practice.
0
BMellert

Guru
Registered:
Posts: 688
Reply with quote  #4 

Thanks Mohnshine.  I didn't know we could "add" events Metastorm doesn't support.  I'll have to try it out (when I have time) as there have been occasions.

0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!