Inside a button onclick function I have:
email(txtEmail.value,txtSubject.value,txtBody.value)
I also have the following function:
Function email(t, subject, body)
location="mailto:" & encodeURI(t) & "?subject=" & encodeURI(subject) & "&body=" + encodeURI(body)
End Function
… which is based on the “SendMail” sample
The issue I’m having is that the word “email” inside the button code gets capitalized (to Email) every time I close then reopen AppStudio. Because of that, when the project is deployed, function “email” doesn’t fire when the button is clicked (Email does not equal email). When I highlight the line or click on and off of it, Email immediately autocorrects back to lower case to match function “email”.
It also only has this behaviour if I have this particular form’s code showing when I close then reopen AppStudio. If I switch to display a different forms code then close and reopen AppStudio, “email” doesn’t get capitalized.
This one drives me a bit nuts since I always need to correct the capitalization before deploying. I have two projects using the same code that exhibit the same behaviour. Just weird how this somehow got scrambled/corrupted.
When I open and close AppStudio with the SendMail sample loaded I don’t see this behavior.
Any clue how to fix this?