Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
en:create:debugging [27.09.2017 10:57] – Correction of some typos from Filter questions to end lchnr.web | en:create:debugging [08.06.2022 17:25] – admin |
---|
While the PHP code of SoSci Survey is being executed on the server, [[en:create:javascript|JavaScript]] will run in the browser of the participant. Accordingly the browser is responsible for finding errors and information. | While the PHP code of SoSci Survey is being executed on the server, [[en:create:javascript|JavaScript]] will run in the browser of the participant. Accordingly the browser is responsible for finding errors and information. |
| |
To do so, the error log is needed. One can find it -- depending on the browser -- at different places. | To do so, the browwser console with its error log is needed: [[:en:general:browser-tools]] |
([[http://webmasters.stackexchange.com/a/77337/30902|Shortcuts (engl.)]], [[https://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors#Step_3:_Diagnosis|Wordpress (engl.)]], [[http://www.stramaxon.com/2013/10/developer-tools-in-browser.html|How to Open Developer Tools (engl.)]]). | |
| |
Use the command ''console.log()'' to find additional information in the error log. Accordingly, the following Java script code would, e.g., look for an element with the HTML-ID "AB01_01" -- and display the same in the error log if it finds it. | Use the command ''console.log()'' to find additional information in the error log. Accordingly, the following Java script code would, e.g., look for an element with the HTML-ID "AB01_01" -- and display the same in the error log if it finds it. |
| |
Browsers nowadays additionally offer an "inspector" or "DOM Explorer" or the like. This allows for clicking on an item on a given page of the survey (a text box, for example), to find further information (e.g., the HTML_Code incl. the HTML-ID) of said item. | Browsers nowadays additionally offer an "inspector" or "DOM Explorer" or the like. This allows for clicking on an item on a given page of the survey (a text box, for example), to find further information (e.g., the HTML_Code incl. the HTML-ID) of said item. |
| |