Ok thanks.
For using javascript I use following hack: Ever wanted to add a RegEx to your prototype? Here's instant embedded AxQuery and JavaScript without header files/plugins
I modified it so it uses your function. But it doesn’t seem to work. Could you take a look?
See attached file. Note: for testing i put the button and field in the same widget.
When I add
//Currently setting the text on an input widget throws an error that SetWidgetFormText doesn't exist.
// This shim fixes that error
SetWidgetFormText = function(elementIds, value) {
//Need to check if elementIds is a string or array. If it's a string this will never work.
if(typeof elementIds == "string") {
elementIds = Array(elementIds);
}
//This is the original function from Axure's expr.js
for(var i = 0; i < elementIds.length; i++) {
var elementId = elementIds[i];
var inputId = $ax.repeater.applySuffixToElementId(elementId, '_input');
var obj = $jobj(inputId);
if(obj.val() == value || (value == '' && $ax.placeholderManager.isActive(elementId))) return;
obj.val(value);
$ax.placeholderManager.updatePlaceholder(elementId, !value);
if($ax.event.HasTextChanged($ax.getObjectFromElementId(elementId))) $ax.event.TryFireTextChanged(elementId);
}
};
to the existing function, it fails.
Test.rplib (76.7 KB)
thanks,
wouter