html update and scriptaculous

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

html update and scriptaculous

NorbertHartl
Hi,

I'm playing around with scriptaculous and html updater.
I use checkboxes to display/hide certain parts of the
page. In one of the parts I use the Slider from
Scriptaculous. There is a problem if the part (containing
the slider) is hidden when the page is loaded. Than the
slider doesn't work.
My guess is that scripts are only loaded for visible
parts of the page. By only updating the DOM via html
updater there is no post-loading of the needed script.

Is there way to make this work? I hope it isn't necessary
to reload the page.

Norbert

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: html update and scriptaculous

Ramon Leon-5
> Hi,
>
> I'm playing around with scriptaculous and html updater.
> I use checkboxes to display/hide certain parts of the page.
> In one of the parts I use the Slider from Scriptaculous.
> There is a problem if the part (containing the slider) is
> hidden when the page is loaded. Than the slider doesn't work.
> My guess is that scripts are only loaded for visible parts of
> the page. By only updating the DOM via html updater there is
> no post-loading of the needed script.
>
> Is there way to make this work? I hope it isn't necessary to
> reload the page.
>
> Norbert

Don't use the updater to show and hide stuff, it's for rendering new content
into the client by making a call back to the server.  That means the content
doesn't exist on the client yet, it's not just hidden, it's not rendered at
all.

To show and hide stuff, use html element not html updater.  

html element id: #someTag; show.

html element id: #someTag; hide.

html element id: #someTag; toggle.

This is also much faster because it simply toggles the display property,
rather than going back to the server.  Just render the content with style:
"display:none" the first time and use the element to show/hide/toggle it.

Ramon Leon
http://onsmalltalk.com 

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: html update and scriptaculous

Lukas Renggli
> > I'm playing around with scriptaculous and html updater.
> > I use checkboxes to display/hide certain parts of the page.
> > In one of the parts I use the Slider from Scriptaculous.
> > There is a problem if the part (containing the slider) is
> > hidden when the page is loaded. Than the slider doesn't work.
> > My guess is that scripts are only loaded for visible parts of
> > the page. By only updating the DOM via html updater there is
> > no post-loading of the needed script.

And did you check with FireBug if you have any bugs ... ?

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: html update and scriptaculous

NorbertHartl
On Wed, 2007-01-17 at 07:33 +0100, Lukas Renggli wrote:

> > > I'm playing around with scriptaculous and html updater.
> > > I use checkboxes to display/hide certain parts of the page.
> > > In one of the parts I use the Slider from Scriptaculous.
> > > There is a problem if the part (containing the slider) is
> > > hidden when the page is loaded. Than the slider doesn't work.
> > > My guess is that scripts are only loaded for visible parts of
> > > the page. By only updating the DOM via html updater there is
> > > no post-loading of the needed script.
>
> And did you check with FireBug if you have any bugs ... ?
>
No, I didn't even know about the existence of something called
firebug :) I'll give it a try.

thanks,

Norbert

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside