> and in your preview.js.erb file do something like:
>
> jQuery('#preview').html('<%= javascript_escape(render(:partial =>
> "preview")) %>');
>
> of course, you'd also need a partial named _preview.erb (or
> _preview.haml)
>
> good luck!
oops, should have said escape_javascript
--
Posted
Difei Zhao wrote:
> Starr Horne wrote:
>> On Tue, 3 Mar 2009 20:25:58 -0600
>> Greg Donald wrote:
>>
>>> > allowed you to render partials in the .rjs file and execute the
>>> > javascript which updates the page, how can I do that using jquery?
>>> > Thanks in advance!
>>
>>
>> I have successful
Starr Horne wrote:
> On Tue, 3 Mar 2009 20:25:58 -0600
> Greg Donald wrote:
>
>> > allowed you to render partials in the .rjs file and execute the
>> > javascript which updates the page, how can I do that using jquery?
>> > Thanks in advance!
>
>
> I have successfully used the jRails plugin. Y
This may or may not answer your question, but I recently discovered a
rails plugin called jrails which integrates jquery into rails very
similar to the way prototype comes in rails.
installing jrails allows you to use this:
<%= javascript_include_tag :defaults %>
to include jquery library files
a
On Wed, 4 Mar 2009 08:08:45 -0600
Greg Donald wrote:
> When I tried it, about 4 or 5 months ago, it did work, but it didn't
> play nice with prototype. Perhaps it's improved since.
Ahh. Well I never it with prototype, so I couldn't say.
SH
--
Starr Horne
My blog: http://starrhorne.com
Check
On Wed, Mar 4, 2009 at 7:55 AM, Starr Horne wrote:
> I have successfully used the jRails plugin. You just drop it in and it
> changes the built in JS jelpers to use jquery.
> http://ennerchi.com/projects/jrails
When I tried it, about 4 or 5 months ago, it did work, but it didn't
play nice with
On Tue, 3 Mar 2009 20:25:58 -0600
Greg Donald wrote:
>
> On Mon, Mar 2, 2009 at 11:31 PM, Difei Zhao
> wrote:
> >
> > Greetings all,
> >
> > I think many fellow rails developers are using jquery extensively now
> > and some one may already solved my problem:
> >
> > rails' RJS facility has h
On Mon, Mar 2, 2009 at 11:31 PM, Difei Zhao
wrote:
>
> Greetings all,
>
> I think many fellow rails developers are using jquery extensively now
> and some one may already solved my problem:
>
> rails' RJS facility has helper methods like "replace_html", they
> allowed you to render partials in
Difei Zhao wrote:
> Greetings all,
>
> I think many fellow rails developers are using jquery extensively now
> and some one may already solved my problem:
>
> rails' RJS facility has helper methods like "replace_html", they
> allowed you to render partials in the .rjs file and execute the
>
9 matches
Mail list logo