Hi I'm making some changes to a bespoke ICT system and am struggling to set a idoc script variable.
<$ dDocID = <script> document.getElementById("docID") </script>$>
<$ dDocID = $> <script> document.getElementById("docID") </script>
I have had success setting javascript variables to the values of idoc script variables but not the other way around.
Any suggestions or even syntax guesses would be appreciated.
You can't do that.
The idoc script runs on the server to generate the page. When the idoc script is finished the page is sent to the browser, where the Javascript runs. You can't send any information from the Javascript to the idoc script that created the page, because by the time the Javascript runs, the idoc script is already done.
To send any information from the browser to an idoc script, you have to make a new request back to the server, so that a new idoc script starts.