[Seaside] Dojo In Seaside Problem with Select List

Nick Ager nick.ager at gmail.com
Thu Sep 1 12:13:10 UTC 2011


My guess (based on my experience with JQuery rather than Dojo), is that the
line: 'dijit.byId' isn't working?
Have you checked in your browser's console (using Firebug or dev tools etc)
that there are no javascript errors?
Once the page had rendered, try opening up the console and
entering dijit.byId("dailyDates"). Do you see any results? If Dojo is
anything like jQuery then you're missing a '#';
try dijit.byId("#dailyDates")


On 1 September 2011 12:58, Randy Nelson <randy.nelson at fiserv.com> wrote:

> I'm fairly new to Seaside, Dojo, etc... I'm posting this on both Dojo and
> this
> forum because I don't know where my problem is...anyway, I'm having trouble
> getting the selected value from a list.
> renderContentOn: html
>    html div
>        class: 'MyPanel';
>        with: [
>            html select
>            id: 'dailyDates';
>            list: (self dates);
>            selected: (self currentDailyDate);
>            callback: [ :value |
>                self currentDailyDate: value ];
>            onChange: (
>                (html jQuery ajax)
>                    script: [ :s |
> s add: (JSStream new nextPutAll: ('var dateList = dijit.byId("dailyDates");
> alert( dateList );'); yourself).
>  ] )
>        ]
> I always get an alert with "undefined" in it. For sanity, (that's
> questionable....), I've tried just setting var dateList = 5 and then my
> alert
> displays "5" as expected. For now, I'm not worried about not trying to get
> the
> selected value - I can't seem to find the component...any ideas? Thanks
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20110901/c4c29b80/attachment.htm


More information about the seaside mailing list