[jQuery] Re: datePicker with rjs (on rails)

2008-10-29 Thread macsig

I GIVE UP.

after a whole day trying to solve it (and sevral posts around the web
without answer) I will implement it without jquery and ajax stuff.


Have a good 1!




On Oct 27, 12:41 pm, macsig <[EMAIL PROTECTED]> wrote:
> UP,
> Please, any idea about that ?
>
> THANK YOU
>
> On Oct 26, 6:38 pm, macsig <[EMAIL PROTECTED]> wrote:
>
> > Hello folks,
> > I'm struggling with datePicker when I need to load it within a RJS
> > file.
> > Basically I have a drop-down menu and according to the selected value
> > I display some form fields (rendering a partial for selected value
> > within a RJS file); one of those has to be the datepicker but I can't
> > correctly load it.
>
> > the rjs looks like
>
> > ...
> > @tasks.each do |task|
> >     page.insert_html :bottom, :tasks, :partial => 'tasks/task'
> >  end
> > ...
>
> > and the partial looks like
>
> > <% fields_for "project[task_attributes][]", task do |t_form| %>
> > ...
> > 
> > ...
>
> > I tried to load the picker within the RJS
>
> > page << "$(function() {$('.date-pick').datePicker();});"
>
> > and I tried to load it within the partial
>
> > 
> >      $j(function() {$j('.date-pick').datePicker();});
> >  "
> > <% fields_for "project[task_attributes][]", task do |t_form| %>
>
> > but in neither cases it works.
>
> > How can I correctly load it?
>
> > THANK YOU, I APPRECIATE YOUR HELP
>
> > have a hood 1!


[jQuery] Re: datePicker with rjs (on rails)

2008-10-27 Thread macsig

UP,
Please, any idea about that ?

THANK YOU

On Oct 26, 6:38 pm, macsig <[EMAIL PROTECTED]> wrote:
> Hello folks,
> I'm struggling with datePicker when I need to load it within a RJS
> file.
> Basically I have a drop-down menu and according to the selected value
> I display some form fields (rendering a partial for selected value
> within a RJS file); one of those has to be the datepicker but I can't
> correctly load it.
>
> the rjs looks like
>
> ...
> @tasks.each do |task|
>     page.insert_html :bottom, :tasks, :partial => 'tasks/task'
>  end
> ...
>
> and the partial looks like
>
> <% fields_for "project[task_attributes][]", task do |t_form| %>
> ...
> 
> ...
>
> I tried to load the picker within the RJS
>
> page << "$(function() {$('.date-pick').datePicker();});"
>
> and I tried to load it within the partial
>
> 
>      $j(function() {$j('.date-pick').datePicker();});
>  "
> <% fields_for "project[task_attributes][]", task do |t_form| %>
>
> but in neither cases it works.
>
> How can I correctly load it?
>
> THANK YOU, I APPRECIATE YOUR HELP
>
> have a hood 1!