This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Dec 11, 2016, 12:57 PM
2 Posts

Corrupted LotusScript Onchange events

  • Category: Domino Designer
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags: onchange
  • Replies: 2

I have developed a pure Notes client application that has been up and running for a couple of years. Suddenly something has happened to my template file, which will destroy functionality if pushed into production.

The main form has over 1000 fields. About hundred of them have on change events. Now I have discovered that the event has changed "automatically", i.e. without my concious doing.

This does not work, because "onChange" is the exact event name for the JavaScript event.

If I delete the code, move out of the event and move back, the code type has changed to "JavaScript":

Then I can select LotusScript, paste the code back and thus make the event work again. Now the event name is "Onchange".

 

To do this on all fields in all forms is nothing I look forward to do. Is there any other way?

 

Production server: Domino Release 9.0.1 FP5 HF21

Development server: Domino Release 9.0.1

Designer client: Release 9.0.1FP6

Dec 15, 2016, 9:57 PM
82 Posts
Proceed with caution and no guarantees ...
Corruption is nasty and many times you cannot recover from it.  If you already looked at something like this:

http://lotusibm.com/database-corruption-and-troubleshooting/

and it has not helped.  And you've already got a backup of the app in case you break something else.  Copy the problem form into a brand new db,  Open that db in designer.  Right click on the corrupt form in the Forms list in the database bookmark panel (ie, on the far left where you see all the db elements) and from the context menu choose 'Edit with DXL' (the prompt that says 'Editing DXL of design element can cause loss of information' is not lying).  When the Form opens click the Source tab towards the bottom (you will see a Design tab and a Source tab).  You will see things like:

field type='text' kind='editable' name='z'><code event='onchange'><lotusscript
>Sub Onchange(Source As Field)
        Print "bob"
End Sub
</lotusscript></code></field>

and/or

<field type='text' kind='editable' name='a'><code event='onChange'
 for='client'><javascript>alert('test')</javascript></code></field>

The Edit menu at the top has a Find/Replace selection that just might be your friend.  Good luck!
Jan 8, 2017, 9:46 PM
2 Posts
DXL editor doesn't show the event corruption

Thanks, Bob. But in the DXL editor the fields look normal. I have checked the form both in my template and in a new nsf, as you recommended.

I had forgot about the DXL editor, but I have used it before for copying fields and doing find & replace. It's very convenient when you name fields with an index like above.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal