Take these two basic bits of HTML.
<input id="user_email" name="user[email]"
size="30" type="text" value="" />
<script type="text/javascript">
//<![CDATA[
new Form.Element.EventObserver(''user_email'', function(element,
value)
{new Ajax.Request(''/account/validate_user_email/0'',
{asynchronous:true, evalScripts:true, parameters:''user_email=''
+
value})})
//]]>
</script>
and
<input id="user_first_name" name="user[first_name]"
size="30"
type="text" value="" />
<script type="text/javascript">
//<![CDATA[
new Form.Element.EventObserver(''user_first_name'',
function(element,
value) {new
Ajax.Request(''/account/validate_user_first_name/0'',
{asynchronous:true, evalScripts:true,
parameters:''user_first_name='' +
value})})
//]]>
</script>
You would think they are completely identical. Both just a simple text_field
and then an observe_form done the way that they are prescribed to be done.
However, the first one does generate a request on change and the second one
does. No errors are produced by the email version. And, the same effect is
had on Safari and Firefox 1.5.0.1 on three different platforms.
This also works where "last_name" works and "password"
doesn''t work and
"login" does work.
Seemingly random as they are all produced by the same code (totally DRY).
Anybody know why?
I see Ticket #4140
http://dev.rubyonrails.org/ticket/4140
But, doesn''t look like anyone is planning on fixing it anytime soon.
Can other people reproduce this? Anyone else found a way around it?
This seems like a pretty serious bug to me.
-hampton.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060415/21b96970/attachment.html