Rakhi Sandhu 19.Apr.13 07:50 AM a Web browser Applications Development 7.0.3 All Platforms
We have a web form with many radio buttons, each radio button has many options. Each radio button has “Automatically refresh fields” selected. This is to enable us to show / hide additional sections on the form based on what is selected in the radio button.
We have a “Submit” button that performs a @Command([FileSave]);@Command([CloseWindow]).
We have a LotusScript “WebQuerySave” agent that performs additional validation and populates text fields with error messages (e.g. you can’t have this option selected without entering details in another field). If any errors are found, the form is redisplayed in edit mode (via print statement on the console - Print "[/" & db_current.FilePath & "/0/" & doc.UniversalID & "?editdocument]" ).
If there are no errors, the form is submitted.
What we are finding is that our JS code is successfully changing the values of the radio buttons, unless the “Submit” button has been selected and the “WebQuerySave” agent has run.
What appears to happen is that our changes made via JS (e.g. document.forms.RadioButtonField[i].checked = false) are lost when we click on the “Submit” button as when the form refreshes it has brought the previously selected value back.
It’s almost like we need to send the change back to the server before the Submit takes place