>
> It seems to me that unobtrusive javascript is
> good, but it's a pain to actually make it work.  Is that the general
> consensis?


First of all, no that's not really the consensus. That may be a general
truth that speaks to the fact that for some cases it's not as straight
forward as one may think before attempting it, but once learned it's like
riding a bike.

Having said that, ask yourself this question: without javascript is it
possible, in your application, to even get those HTML fragments into the
page? It appears not. It appears you are using a flavor of Ajax where these
chunks of HTML you are so worried about applying unobtrusive javascript to
would not ever exist without javascript being available to begin with (i.e.
to make the Ajax call)... so... why be so worried then about unobtrusive
javascript for those HTML bits?

Now, to be a bit more helpful, I can just say you're on the right track. I,
however, reserve classes for style, and use ids for element identification
and selection. And I would certainly say storing data in a name attribute is
not a best practice. If you are eval'ing the returned js... why not set an
application variable (or set of them) to transfer state across requests?

It's all a learning process... and it comes in stages. I'd say you're doing
things right so far, just keep trying to improve and keep asking questions.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to