Hello,
I'm new to prototype.js and after reading the documentation i still
cant find the solution to my problem. I have two html elements, an
input type=hidden that keeps the value needed to be posted and an UI
value, an input type=text (or a select, etc.). I need to keep these 2
elements syncronized, meaning that when the hidden gets a property
changed, the UI element's property is also changed, and vice-versa.
Until now, my script was made for IE only, with onpropertychange. I
need to get it working with mozilla also.
For mozilla i found two solutions
(element.addEventListener('DOMAttrModified',
handlePropertyChangeFunction, false); and element.watch(property,
handlePropertyChangeFunction);) but both of them dont work with IE.
How can I use prototype.js to solve my cross browser problem ? What
event must I register with the elements to be able to now when a
property has been changed from a JS function ?
My script for IE looks like this :
<public:attach event="onpropertychange"
onevent="handlePropertyChange()"/>
<script language="JScript">
function handlePropertyChange() {
if (event.propertyName == 'value') {
syncronize hidden element with UI
}
}
</script>
Thank you,
Bogdan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---