posted 16 years ago
Hi all,
I'm using ajaxtags to populate fields. When I set the onchange attribute in the (ajaxtags-) source element, the onchange function is not being executed.
When I make this element no-ajaxtag-source, the function executes.
Thus, ALERT NOT WORKING example:
----------------------------------------------------------------------
<input type="text" id="ajaxSource" onchange="alert('Just changed')"/>
<input type="select" id="someOtherField"/>
<ajax:select
baseUrl="ajax.go"
source="ajaxSource"
target="someOtherField"
parameters="value={ajaxSource}"
/>
ALERT WORKING example:
----------------------------------------------------------------------
<input type="text" id="ajaxSource_xxxx" onchange="alert('Just changed')"/>
<input type="select" id="someOtherField"/>
<ajax:select
baseUrl="ajax.go"
source="ajaxSource"
target="someOtherField"
parameters="value={ajaxSource}"
/>
What I want is to trigger this population when a source field is populated by javascript instead of by hand (by clicking somewhere else).
I have tried to call document.getElementById('ajaxSource').onchange() after I have set the value but it does not work.
Anybody? Thank you.
[ September 24, 2007: Message edited by: Milan Tomc ]
[ September 24, 2007: Message edited by: Milan Tomc ]