This topic is locked
[SOLVED]

 Add Javascript Page Onload Event Using Date Picker

4/18/2013 7:00:16 AM
PHPRunner General questions
D
dannylcy author

Does anyone know how to trigger the javascript onload event when the datepicker selected the date?

When I used the script like this
var svdate = Runner.getControl(pageif, ' sv_actual_date');
svdate.on('change', function(){

alert("new date changed");

})
The result is failed when I used datepicker to input the date. However, when I input the date manually. The event was run successfully.

W
wildwally 4/19/2013



Does anyone know how to trigger the javascript onload event when the datepicker selected the date?

When I used the script like this
var svdate = Runner.getControl(pageif, ' sv_actual_date');
svdate.on('change', function(){

alert("new date changed");

})
The result is failed when I used datepicker to input the date. However, when I input the date manually. The event was run successfully.


should that not be pageid not pageif

D
dannylcy author 4/21/2013



should that not be pageid not pageif


Thx wildwally, this is my typo. However, this control can't trigger the function by datepicker.

Do you know how to use datepicker to trigger the function in javascript onload page?