Setting formslib date via AJAX

Setting formslib date via AJAX

by Ramo Karahasan -
Number of replies: 1

Hi,

i've created an module, which have two date selectors. how can i set this date selectors via YUI to the appropriate date saved in the Database? The date is retrieved via an YUI ajax call and is returned in an jsonified array. I can't use the id of the select, because they look like:id_23k5l2

Thank you for the help,

Ramo

Average of ratings: -
In reply to Ramo Karahasan

Re: Setting formslib date via AJAX

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You can use the name. Something like

Y.one("select[name='mydate[day]']");

should let you get the right element.