Script Include Returning NULL Value to Client Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2023 12:23 PM
1. The script include is client callable, we are building a JSON object and trying to return it after using JSON.stringify();
2. our console log statement in the client script shows a null value each time rather than the JSON object String.
Below is an image of the client script, script include, and both console log and gs log results.
XML Records are also attached for both script include and client script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2023 02:46 PM
Hi,
does adding "alert(response);" as the first line in the ParseName function in the Client Script show anything when you test? I'm not familiar with the use of 'jslog()'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2023 07:02 AM
jslog prints items to the console, alert still shows null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2023 03:16 PM
On Line 18 of your client script, switch it from 'response' to 'answer'
IE: function ParseName(answer)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2023 07:10 AM
changing the name of the return variable did not work.