This topic is locked

Javascript

8/10/2016 1:12:09 PM
PHPRunner General questions
S
salim author

Scripts on Javascript OnLoad Events are not working in PHPRunner Version 9.0 Build 26897, it is working fine in Version 8.1 and Version 7.1
The script is given below:
// Expiry Date

var mSubDate = Runner.getControl(pageid,'SubscriptionDate');

var mExpDate = Runner.getControl(pageid,'ExpiryDate');

var mDueDate = Runner.getControl(pageid, 'SubsDueDate');

// Change values

var mSubscriptionDate = mSubDate.getValue();

mSubscriptionDate.setMonth(mSubscriptionDate.getMonth()+1);

mExpDate.setValue(mSubscriptionDate);

var mSubsDueDate = mExpDate.getValue();

mSubsDueDate.setDate(mSubsDueDate.getDate()-5);

mDueDate.setValue(mSubsDueDate);
mSubDate.on('change', function(e){

var mSDate = mSubDate.getValue();

mSDate.setMonth(mSDate.getMonth() + 1);

mExpDate.setValue(mSDate);

var mDDate = mExpDate.getValue();

mDDate.setDate(mDDate.getDate()-5);

mDueDate.setValue(mDDate);

}

);
Please help

Thanks

Sergey Kornilov admin 8/10/2016

You need to find what exactly doesn't work here. Here is the troubleshooting guide:

http://xlinesoft.com/phprunner/docs/troubleshooting_javascript_errors.htm

S
salim author 8/10/2016



You need to find what exactly doesn't work here. Here is the troubleshooting guide:

http://xlinesoft.com/phprunner/docs/troubleshooting_javascript_errors.htm



Nope it is still not working, also downloaded Firebud add on, it gives no error, when the page comes up the initial dates are calculating fine, but when I change the subscription date the expiry date and the due date does not change accordingly. The same script is working fine in version 7.1 and version 8.1.
Thanks

S
salim author 8/10/2016



Nope it is still not working, also downloaded Firebud add on, it gives no error, when the page comes up the initial dates are calculating fine, but when I change the subscription date the expiry date and the due date does not change accordingly. The same script is working fine in version 7.1 and version 8.1.
Thanks


Ok when I disable the calendar control and select none on Subscription Date field, the script works, so I guess there is an issue with the calendar control.