Scriptaculous problem

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

Scriptaculous problem

keith1y
Whenever I try to triggerFormElement: id I seem to get a js error.

$("id67").serialize is not a function

I have tried adapting SUFormTest to recreate the error without success.
It would be useful to know what this error is about.

thanks in advance

Keith

---
Another Scriptaculous bug:

Using firefox 2.0.0.7 on Mac OS X.  When looking at Scriptaculous form
tests and browsing the code the scrollbar from the multi-select list
shows through.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Scriptaculous problem

keith1y
Keith Hodges wrote:
> Whenever I try to triggerFormElement: id I seem to get a js error.
>
> $("id67").serialize is not a function
It appears this problem is caused by duplicate id's

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

RE: Re: Scriptaculous problem

Sebastian Sastre-2
All $().fooBar is not a function is js unable to create the element object
for some reason. I also remember happening that to me, and I solved that
using a whole hierarchy of WAComponent subclasses that has an instVar #id
that is guaranteed to be unique (get from a class variable #Counter in the
abstract superclass) per element per page and is set at #initialize time.

I imagine this should be kind of common need for others too,

        cheers,

Sebastian Sastre

 

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Keith Hodges
> Enviado el: Miércoles, 26 de Septiembre de 2007 12:11
> Para: The Squeak Enterprise Aubergines Server - general discussion.
> Asunto: [Seaside] Re: Scriptaculous problem
>
> Keith Hodges wrote:
> > Whenever I try to triggerFormElement: id I seem to get a js error.
> >
> > $("id67").serialize is not a function
> It appears this problem is caused by duplicate id's
>
> Keith
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

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

Re: Re: Scriptaculous problem

Lukas Renggli
> All $().fooBar is not a function is js unable to create the element object
> for some reason. I also remember happening that to me, and I solved that
> using a whole hierarchy of WAComponent subclasses that has an instVar #id
> that is guaranteed to be unique (get from a class variable #Counter in the
> abstract superclass) per element per page and is set at #initialize time.

Why not use

     html nextId

to generate an unique id?

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: Re: Scriptaculous problem

Sebastian Sastre-2
Because that makes me unable to recall the id of the components at nay time
to wire events between them among other uses.

        regards,

Sebastian Sastre

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Lukas Renggli
> Enviado el: Miércoles, 26 de Septiembre de 2007 13:35
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] Re: Scriptaculous problem
>
> > All $().fooBar is not a function is js unable to create the element
> > object for some reason. I also remember happening that to me, and I
> > solved that using a whole hierarchy of WAComponent
> subclasses that has
> > an instVar #id that is guaranteed to be unique (get from a class
> > variable #Counter in the abstract superclass) per element
> per page and is set at #initialize time.
>
> Why not use
>
>      html nextId
>
> to generate an unique id?
>
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

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

Re: Re: Scriptaculous problem

John Thornborrow
renderContentOn: html
        | anHtmlId |
        anHtmlId := html nextId.
        html div
                id: anHtmlId;
                with: 'some text'.
        html anchor
                onClick: (html effect id: anHtmlId; shake);
                with: 'Shake it baby!'

Can you not use like that, or with instance var? :)

Regards,
John

Sebastian Sastre wrote:

> Because that makes me unable to recall the id of the components at nay time
> to wire events between them among other uses.
>
> regards,
>
> Sebastian Sastre
>
>> -----Mensaje original-----
>> De: [hidden email]
>> [mailto:[hidden email]] En nombre
>> de Lukas Renggli
>> Enviado el: Miércoles, 26 de Septiembre de 2007 13:35
>> Para: Seaside - general discussion
>> Asunto: Re: [Seaside] Re: Scriptaculous problem
>>
>>> All $().fooBar is not a function is js unable to create the element
>>> object for some reason. I also remember happening that to me, and I
>>> solved that using a whole hierarchy of WAComponent
>> subclasses that has
>>> an instVar #id that is guaranteed to be unique (get from a class
>>> variable #Counter in the abstract superclass) per element
>> per page and is set at #initialize time.
>>
>> Why not use
>>
>>      html nextId
>>
>> to generate an unique id?
>>
>> Lukas
>>
>> --
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>> _______________________________________________
>> Seaside mailing list
>> [hidden email]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>  
>


Pinesoft Computers are registered in England, Registered number: 2914825. Registered office: 266-268 High Street, Waltham Cross, Herts, EN8 7EA



This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com

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

RE: Re: Scriptaculous problem

Sebastian Sastre-2
Yeah that’s fine in that context, but what if you need reference #id and
you're not at render time?
I have components that are created at a time (structure bewteen them, etc),
wired a another time (action/reaction between them in the UA) and as last
task rendered in canvas.

        cheers,

Sebastian Sastre


> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de John Thornborrow
> Enviado el: Miércoles, 26 de Septiembre de 2007 13:53
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] Re: Scriptaculous problem
>
> renderContentOn: html
> | anHtmlId |
> anHtmlId := html nextId.
> html div
> id: anHtmlId;
> with: 'some text'.
> html anchor
> onClick: (html effect id: anHtmlId; shake);
> with: 'Shake it baby!'
>
> Can you not use like that, or with instance var? :)
>
> Regards,
> John
>
> Sebastian Sastre wrote:
> > Because that makes me unable to recall the id of the
> components at nay
> > time to wire events between them among other uses.
> >
> > regards,
> >
> > Sebastian Sastre
> >
> >> -----Mensaje original-----
> >> De: [hidden email]
> >> [mailto:[hidden email]] En nombre de
> >> Lukas Renggli Enviado el: Miércoles, 26 de Septiembre de 2007 13:35
> >> Para: Seaside - general discussion
> >> Asunto: Re: [Seaside] Re: Scriptaculous problem
> >>
> >>> All $().fooBar is not a function is js unable to create
> the element
> >>> object for some reason. I also remember happening that to
> me, and I
> >>> solved that using a whole hierarchy of WAComponent
> >> subclasses that has
> >>> an instVar #id that is guaranteed to be unique (get from a class
> >>> variable #Counter in the abstract superclass) per element
> >> per page and is set at #initialize time.
> >>
> >> Why not use
> >>
> >>      html nextId
> >>
> >> to generate an unique id?
> >>
> >> Lukas
> >>
> >> --
> >> Lukas Renggli
> >> http://www.lukas-renggli.ch
> >> _______________________________________________
> >> Seaside mailing list
> >> [hidden email]
> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> > _______________________________________________
> > Seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> >
> >  
> >
>
>
> Pinesoft Computers are registered in England, Registered
> number: 2914825. Registered office: 266-268 High Street,
> Waltham Cross, Herts, EN8 7EA
>
>
>
> This message has been scanned for viruses by BlackSpider
> MailControl - www.blackspider.com
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

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