• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ajaxtags onchange consumption?

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic