This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

By registering to the eWON TechForum, you agree to the HMS Privacy Policy.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

eWON TechForum is meant to answer all questions concerning the development realized with or in an eWON device, in collaboration (or not) of Talk2M service, destined to take advantage of IIOT... This targets coding (Basic, Java, HTML, ...), viewON, APIs, Flexy oriented questions.

If you need help to set up an eWON device, establish a connection from/to an eWON, Cosy 131 related matters... please refer to your eWON distributors first as he is probably the best choice to quickly troubleshoot configuration issue.

If you are not sure, post your questions into the relevant section here under and someone will guide you so you can receive the correct answer.


  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
javascript on text input
#1
I've run into an issue and I'm hoping someone else has hit it too and has come up with a good workaround.

I have a text field on my viewON page.  The actions available for a text field are a little limited - I can either put the contents into a string tag on my eWON or I can run a BASIC script.  I would like to run some javascript instead.  Right now, after I export my viewON project to my eWON, I edit the resulting .shtm file and replace

"UID_NoteContainer":[{"type":"sendString","tag":"BASICscript","sendType":"script","events":[{"event":"change"}]}]

with 

"UID_NoteContainer":[{"type":"executeJS","method":/**Start of Execute JS Action of group element.**/function(id) {my javascript here;}/**End of Execute JS Action of group element.**/,"events":[{"event":"change"}]}]

in the actionConfig string. It works fine.  However, I'd REALLY like to skip having to manually edit the .shtm file and re-export it every time I make a change to my project.  

I feel like there should be a way to run a script when the page loads to update the actionConfig string, but my javascript skills are too limited.  Can anyone help me out?
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Viewon Text on Interval -- Invalid Fritz 2 304 10-08-2018, 04:05 PM
Last Post: Ludo
  Combo Box Unwanted Text HAL9000 4 922 12-01-2018, 03:45 PM
Last Post: MadhuriSalunkhe

Forum Jump:


Users browsing this thread: 1 Guest(s)