This topic is locked

Simple Javascript not working on production

12/4/2016 6:44:31 PM
PHPRunner General questions
H
headingwest author

I have a javascript alert that works on PHPRunner's built in web server, but not when I move it to my production server:
In Javascript OnLoad event:

var ctrl = Runner.getControl(pageid, 'msg_date');

ctrl.makeReadonly();
this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

alert("Thanks for contacting us");

return true;

});


Live version not working at this site:

Contact Us Form
Thanks for any help

lefty 12/5/2016



I have a javascript alert that works on PHPRunner's built in web server, but not when I move it to my production server:
In Javascript OnLoad event:

var ctrl = Runner.getControl(pageid, 'msg_date');

ctrl.makeReadonly();
this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

alert("Thanks for contacting us");

return true;

});


Live version not working at this site:

Contact Us Form
Thanks for any help


still accessing localhost . Maybe the robot key from google. You need to specify your domain not localhost.

Uncaught DOMException: Blocked a frame with origin "https://www.google.com"; from accessing a cross-origin frame.(...)

H
headingwest author 12/5/2016



still accessing localhost . Maybe the robot key from google. You need to specify your domain not localhost.

Uncaught DOMException: Blocked a frame with origin "https://www.google.com"; from accessing a cross-origin frame.(…)


Thanks for the heads up John, where did you find that information??
The Google recaptcha is loaded by PHPRunner, not in my code. The domain is registered with Google:
Domains:

iconicbeans.com

iconicbeans.com.au

localhost