Hello,
I would like to create an event when I (un)check a checkbox.
The only thing that makes sense is to choose 'function' as Action. But if I add an added Event to the Element/fct?Element field, then noting happens.
Is there a goor explaination anywhere?
Thnx,
Bart
I would like to create an event when I (un)check a checkbox.
The only thing that makes sense is to choose 'function' as Action. But if I add an added Event to the Element/fct?Element field, then noting happens.
Is there a goor explaination anywhere?
Thnx,
Bart
Hi Bart,
What do you want the event to do? It might be easier to write it in JavaScript - though I think that the = and != should work for a single checkbox. If you use 'function' then you need to put the function name in the Element ID/fn()/Event box; write the function and include it in a Load JS action.
Here's an example of a function that checks a domain name in a text input:
Bob
What do you want the event to do? It might be easier to write it in JavaScript - though I think that the = and != should work for a single checkbox. If you use 'function' then you need to put the function name in the Element ID/fn()/Event box; write the function and include it in a Load JS action.
Here's an example of a function that checks a domain name in a text input:
function checkDomain(el) {
if ( /^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+$/m.test(el.val()) ) {
return true;
} else {
return false;
}
}
Bob
This topic is locked and no more replies can be posted.