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 next 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!



Re: JAVASCRIPT CODE FOR INPUT FIELD [message #4636 is a reply to message #4635] Mon, 12 January 2015 05:23 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
Why does the order of the <script> and <input> tags make a difference?

Re: JAVASCRIPT CODE FOR INPUT FIELD [message #5119 is a reply to message #4636] Tue, 03 November 2015 03:45 Go to previous messageGo to next message
agileinfoways is currently offline  agileinfoways
Messages: 1
Registered: November 2015
Location: Duluth, GA
Junior Member

I'd also certainly like to know about script and input tags?
Re: JAVASCRIPT CODE FOR INPUT FIELD [message #5121 is a reply to message #5119] Tue, 03 November 2015 05:19 Go to previous message
AJM is currently offline  AJM
Messages: 2347
Registered: April 2006
Location: Surrey, UK
Senior Member
Those are HTML tags and therefore not part of the PHP language. You will need to look at the HTML documentation.

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


Current Time: Thu Mar 28 17:36:20 EDT 2024

Total time taken to generate the page: 0.01345 seconds