Código:
subrayo en negritas el input que quiero que mande llamar a la funcion del javascript, function add($table_DB){ $html = Table::Top("Adding Booking"); $html .= Person::formAdd(); $html .= Table::Footer(); $objResponse = new xajaxResponse(); $objResponse->addAssign("formDiv", "style.visibility", "visible"); $objResponse->addAssign("formDiv", "innerHTML", $html); return $objResponse->getXML(); } $xajax->processRequests();
la pregunta es como hago para que el xajax me imprima el javascript necesario para que me aparezca el calendario, mil gracias por cualquier comentario
Código:
function formAdd(){ $html .= ' <!-- No edit the next line --> <form method="post" name="f" id="f"> <input type="hidden" id="costaux" name="costaux"> <input type="hidden" id="costarrivaux" name="costarrivaux"> <input type="hidden" id="costdepaux" name="costdepaux"> <table border="1" width="100%" class="adminlist"> <tr> <td nowrap align="left">Booking</td> <td align="left"><input type="text" id="booking" name="booking" size="25"></td> </tr> <tr> <td nowrap align="left">Guest</td> <td align="left"><input type="text" id="nombre" name="nombre" size="25"></td> </tr> <tr> <td nowrap align="left"># Pax Arr.</td> <td align="left"><input type="text" id="persoarrival" name="persoarrival" size="35"></td> </tr> <tr> <td nowrap align="left">Date Arr <b>"AAAA-MM-DD"</b></td> <td align="left"><input type="text" id="datearrival" name="datearrival" size="35" disabled="true" onclick=\'displayDatePicker("datearrival")";return false;\'</td> </tr> <tr> <td nowrap align="left">Hotel Arr</td> <td align="left"> <select id="hotelarrival" name="hotelarrival" onfocus="xajax_selectI();" onblur=\'xajax_selectIR(xajax.getFormValues("f"));return false;\'> <option value="'.E.'"> - Select field - </option> </select> </tr> <!-- Atrapa el costo asignado se dispara con el evento de arriba--> <tr> <td nowrap align="left">Rate Value</td> <td align="left"> <select id="costarriv" name="costarriv"> <option value="'.E.'"> - Select field - </option> </select> </tr> <!-- Atrapa el costo asignado se dispara con el evento de arriba--> <tr> <td nowrap align="left">Flight Arr</td> <td align="left"><input type="text" id="vueloarrival" name="vueloarrival" size="35"></td> </tr> <tr> <td nowrap align="left">Hour Arr <b>"MM:SS"</b></td> <td align="left"><input type="text" id="horaarrival" name="horaarrival" size="35"></td> </tr> <tr> <td nowrap align="left">Comp. Arr</td> <td align="left"><input type="text" id="companiaarrival" name="companiaarrival" size="35" value="WEST JET"></td> </tr> <tr> <td nowrap align="left">Obs. Arr</td> <td align="left"><input type="text" id="observacionarrival" name="observacionarrival" size="35"></td> </tr> <tr> <td nowrap align="left"># Pax Dep</td> <td align="left"><input type="text" id="persodepar" name="persodepar" size="35"></td> </tr> <tr> <td nowrap align="left">Date Dep <b>"AAAA-MM-DD"</b></td> <td align="left"><input type="text" id="datedepar" name="datedepar" size="35"></td> </tr> <tr> <td nowrap align="left">Hotel Dep</td> <td align="left"> <select id="hoteldepar" name="hoteldepar" onfocus="xajax_selectS();" onblur=\'xajax_selectSR(xajax.getFormValues("f"));return false;\'> <option value="'.E.'"> - Select field - </option> </select> </tr> <!-- Atrapa el costo asignado se dispara con el evento de arriba--> <tr> <td nowrap align="left">Rate Value</td> <td align="left"> <select id="costdep" name="costdep" onblur=\'xajax_costototal(xajax.getFormValues("f"));\'> <option value="'.E.'"> - Select field - </option> </select> </tr> <!-- Atrapa el costo asignado se dispara con el evento de arriba--> <tr> <td nowrap align="left">Flight Dep</td> <td align="left"><input type="text" id="vuelodepar" name="vuelodepar" size="35"></td> </tr> <tr> <td nowrap align="left">Hour Dep <b>"MM:SS"</b></td> <td align="left"><input type="text" id="horadepar" name="horadepar" size="35"></td> </tr> <tr> <td nowrap align="left">Comp. Dep</td> <td align="left"><input type="text" id="companiadepar" name="companiadepar" size="35" value="WEST JET"></td> </tr> <tr> <td nowrap align="left">Obs. Dep</td> <td align="left"><input type="text" id="observaciondepar" name="observaciondepar" size="35"></td> </tr> <tr> <td nowrap align="left">Cost of Booking</td> <td align="left"><input type="text" id="cost" name="cost" size="35" disabled="true"></td> </tr> <tr> <td nowrap align="left">Transporter</td> <td align="left"><input type="text" id="trasladista" name="trasladista" size="35"></td> </tr> <tr> <td nowrap align="left">Hour Pick Up <b>"MM:SS"</b></td> <td align="left"><input type="text" id="horapu" name="horapu" size="35"></td> </tr> <tr> <td nowrap align="left">Cost of transport</td> <td align="left"><input type="text" id="costtaxi" name="costtaxi" size="35"></td> </tr> <tr> <td colspan="2" align="center"><button id="submitButton" onClick=\'xajax_save(xajax.getFormValues("f"));return false;\'>Save</button></td> </tr> </table> </form> '; return $html; }