Hi!
Sorry, if this has been discussed perviously, but I couldn't find any
postings on this.
I'm trying to write a chat with Rails and Ajax. So I have a chat form
with an id for the last posting. I want to send this to my server
every x seconds, and the server should returns all postings with an id
higher than the id, that was sent to the server.
This is my call:
============
<%= periodically_call_remote( :frequency => "2",
:url => { :action => 'fetch' },
:submit => "document.forms[1]",
:success =>
"updateChatPostings(request)" ) %>
============
and Firefox says in the error console:
$(form) has no properties
when line 2563 is reached:
====================
getElements: function(form) {
return $A($(form).getElementsByTagName('*')).inject([], <==
problem !!!
function(elements, child) {
if (Form.Element.Serializers[child.tagName.toLowerCase()])
elements.push(Element.extend(child));
return elements;
}
);
====================
Firebug says that form has the value document.forms[1] , which should
be ok. document.chat_posting_form etc. also does not work.
I've found some hints, that FF seems to have a problem with those
forms, but no solution yet. FF 1.5 also fails with the page.
Submitting the form field directly (and
not the entire form) also didn't work.
Since I'm not a JS specialist (or a Rails pro), I'm somewhat stuck at
the moment.
Any hints, where to look fora solution?
Thanks in advance,
Andreas
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---