Hi,
I am using following query in render_sql to populated events data
$scheduler->render_sql("select user_events.*, ust.user_service_type_description as descpt from user_events join user_service_type ust on(ust.user_service_type_id = user_events.type_id) where user_id = ".$user_id,“user_event_id”, “start_date,end_date,event_name,event_details,user_id,type_id,rec_type,event_pid,event_length,descpt”);
The XML output is:
<event id='2' >
<start_date><![CDATA[2010-06-10 00:00:00]]></start_date>
<end_date><![CDATA[0000-00-00 00:00:00]]></end_date>
<text><![CDATA[]]></text>
<event_details><![CDATA[---]]></event_details>
<user_id><![CDATA[1]]></user_id>
<type_id><![CDATA[1]]></type>
<rec_type><![CDATA[]]> </rec_type>
<event_pid><![CDATA[0]]></event_pid>
<event_length><![CDATA[0]]></event_length>
<descpt><![CDATA[Event]]></descpt>
</event>
And, following the PHP part of example samples/01_initialization_loading/08_options.html to generate options from a table. and need to attach an onchange event to it. The xml for type is as follows: (generated from user_service_type table, which has user_service_type_id, name & description)
<coll_options for=‘type’>
</coll_options>
And in lightbox.sections i have used,
{name:“type”, height:21, map_to:“type”, type:“select”,options:scheduler.serverList(“type”) }, {name:“description”, height:30, map_to:“descpt”, type:“textarea”},
Once user selecte types from the select box i need to change the value of description section & this description section is mapped to ‘descpt’ - which is taken from the query with join in above. And description section needs to be read only.
How would i attach event to select box and make description field ready only just to display the descpt value??? What is the better way to use joins in render_sql??
Please reply soon.