Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Application Development » JAVASCRIPT CODE FOR INPUT FIELD
JAVASCRIPT CODE FOR INPUT FIELD [message #4635] Mon, 12 January 2015 02:23 Go to previous message
edortizq is currently offline  edortizq
Messages: 82
Registered: August 2008
Location: Ecuador
Member

Dear Tony
I'm trying to execute some javascript code associated to an input field, this is my _cm_changeConfig function:

function _cm_changeConfig ($where, $fieldarray)
// Change the table configuration for the duration of this instance.
{
if ($GLOBALS['task_id'] == 'inp_muestraspmc(add1)' OR $GLOBALS['task_id'] == 'inp_muestraspmc(upd1)')
{

$this->fieldspec['fechamuestra']['javascript'] = array( 'javascript' => "ng.ready(selectDateFromCalendar('fechamuestra'));");
} // if

return $fieldarray;

} // _cm_changeConfig


That's what I see as the HTML source code from the browser

<td colspan="3">
<script language="javascript">ng.ready( selectDateFromCalendar('fechamuestra'));</script>
<input name="fechamuestra" id="fechamuestra" class="text" type="text" value="2015-01-12" maxlength="12" size="12" />
</td>

But, what I need is something like this

<td colspan="3">
<input name="fechamuestra" id="fechamuestra" class="text" type="text" value="2015-01-12" maxlength="12" size="12" />
<script language="javascript">ng.ready( selectDateFromCalendar('fechamuestra'));</script>
</td>

Please let me know if I'm doing something wrong.

Thanks for advance!



 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Running batch jobs
Next Topic: BUTTON IN THE DATA AREA
Goto Forum:
  


Current Time: Sat Apr 20 01:01:34 EDT 2024

Total time taken to generate the page: 0.00845 seconds