Conditional events?
Posted: Mon Oct 15, 2012 1:49 pm
I have an application that generated JSON in a file on the IFS, then redisplays the screen. The file name is variable (based on user, job, etc). Provided the creation of the JSON file was successful, when the screen is redisplayed, I'd like to invoke a javascript function, passing in the file name as a parameter, so that function can load the JSON data and act on it.
However, it seems I cannot bind any display format or element events to a program field so that I could set it to "myfunction('filename.json')" for when the page is redisplayed.
I tried searching for ways to do this on the forum but came up empty. I tried placing <script>myfunction('filename.json');</script> in an html container, but apparently it doesn't execute javascript. Also, the amount of data (size of my json file) will exceed the maximum variable size on the display format. Otherwise I could load the data in an html or other container and invoke javascript to pull the field value and act on it.
--Bryan
However, it seems I cannot bind any display format or element events to a program field so that I could set it to "myfunction('filename.json')" for when the page is redisplayed.
I tried searching for ways to do this on the forum but came up empty. I tried placing <script>myfunction('filename.json');</script> in an html container, but apparently it doesn't execute javascript. Also, the amount of data (size of my json file) will exceed the maximum variable size on the display format. Otherwise I could load the data in an html or other container and invoke javascript to pull the field value and act on it.
--Bryan