The Ultimation wrote: > >> >> Generating JavaScript dynamically with ERb is almost never a good thing >> in my experience. Make your JavaScript static by getting the profile_id >> from the DOM or a URL parameter. >> >> Best, >> -- >> Marnen Laibow-Koser >> http://www.marnen.org >> [email protected] > > Well, there's some code inside the method
Inside *what* method? Where? Is this a Ruby method or a JavaScript method? > that needs to execute first, > then change the element on the screen with javascript. That sounds like a very smelly design. Can you explain a bit more about what you're trying to do? > using js.erb is > the only way I know to do both of those things. ...which probably indicates a design problem. > I can change the element > on the screen with a click function but I don't know how I'd get the > method's code to execute as well. Again, where is this method? That answer may lead to some suggestions? Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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-talk?hl=en.

