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 [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
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 <[hidden email]> wrote: I'm fairly new to Seaside, Dojo, etc... I'm posting this on both Dojo and this _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Nick Ager <nick.ager <at> gmail.com> writes:
> > > 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 | Thanks for the reply Nick. I am using Firebug and I don't see any errors on the console. When I type dijit.byId("dailyDates") - and all variations (#, ', etc...) - on the console, I still get undefined. What really confuses me is that I can easily find other ids - either on the console on in javascript. _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |