Managing Javascript code for webviewer

Discussion created by madmike6537 on Sep 3, 2014
Latest reply on Sep 3, 2014 by madmike6537

Hello all,


I have been building a webviewer and learning HTML CSS and Javascript along the way. Within my Javascript code, I need to reference some of my filemaker fields. That is no problem as long as I type all the code inside of the calculation, but as my code grows, its getting increasingly difficult to manage it all inside of a calculation text box.


I would like to just type up all my code outside of filemaker, then paste it into a text field which I could reference from the calculation. The problem with that, it seems, is that I cant reference my filemaker fields that way. It seems those have to be inside the calculation or they dont work (unless I am doing something wrong). I wonder if there is a way for my to pass my filemaker fields as a parameter when I reference that script?


I am curious how others manage their webviewer code. If you keep it in a seperate file - how do you access filemaker fields? And do you simply store the code in a text field, or maybe a container field with the .js file and access that some way?