[Rails] Re: Help with an RJS

2008-10-31 Thread Frederick Cheung
Sent from my iPhone On 30 Oct 2008, at 22:35, elioncho <[EMAIL PROTECTED]> wrote: > > I added the () but that's not the problem. I added the next alert and > it shows the events length. But if I remove another event it still > shows the same number. > Well it was syntaxtically incorrect javasc

[Rails] Re: Help with an RJS

2008-10-30 Thread elioncho
Thanks all of you for help. Daniel I think that's what's happening. I'll try another approach. Elioncho On Oct 30, 9:44 pm, Daniel Bush <[EMAIL PROTECTED]> wrote: > elioncho wrote: > > The childElements length never changes when I make the event > > disappear. It's like it remains with what init

[Rails] Re: Help with an RJS

2008-10-30 Thread Daniel Bush
elioncho wrote: > The childElements length never changes when I make the event > disappear. It's like it remains with what initially is loaded on the > html eventhough I have hide this elements. > I don't use these effects a lot, but the fade effect in prototype/ scriptaculous is probably sett

[Rails] Re: Help with an RJS

2008-10-30 Thread elioncho
The childElements length never changes when I make the event disappear. It's like it remains with what initially is loaded on the html eventhough I have hide this elements. On Oct 30, 7:02 pm, boblu <[EMAIL PROTECTED]> wrote: > why don't you write 2--4 line into a single line ? > > page << "if ($

[Rails] Re: Help with an RJS

2008-10-30 Thread boblu
why don't you write 2--4 line into a single line ? page << "if ($('single_blog_info_box_480').childElements().length == 0 ){$('message').Appear;}" On Oct 31, 7:35 am, elioncho <[EMAIL PROTECTED]> wrote: > I added the () but that's not the problem. I added the next alert and > it shows the events

[Rails] Re: Help with an RJS

2008-10-30 Thread elioncho
I added the () but that's not the problem. I added the next alert and it shows the events length. But if I remove another event it still shows the same number. page << "alert($('single_blog_info_box_480').childElements().length)" On Oct 30, 5:05 pm, Frederick Cheung <[EMAIL PROTECTED]> wrote:

[Rails] Re: Help with an RJS

2008-10-30 Thread Frederick Cheung
On 30 Oct 2008, at 21:55, elioncho wrote: > > Hello, I have a code on a RJS where I want to check if an element in > the DOM has child elements, if not, show a message. > > 1.page["event_"[EMAIL PROTECTED] :fade #This works > 2.page << "if $('single_blog_info_box_480').childElements().length ==