Javascript and MAS

For help in an app, I am going with something very simple, just some straight HTML code viewed by the HTMLViewer. Cross-platform considerations is making me keep it as simple as possible. My Windows-based Help Authoring tool can crank out a lot of fancy stuff for Windows that I don’t need, but one thing that I cannot get rid of other than manually editing the HTML files is references to 3 Java scripts at the top of the HTML page (i.e. helpman_topicinit.js), that reside in the same folder.

My question is this: Looking out in the future, is there any issue with HTML pages viewed in the HTMLView that have calls to Javascript if I try to get this app into the MAS someday?

[quote=223004:@Merv Pate]For help in an app, I am going with something very simple, just some straight HTML code viewed by the HTMLViewer. Cross-platform considerations is making me keep it as simple as possible. My Windows-based Help Authoring tool can crank out a lot of fancy stuff for Windows that I don’t need, but one thing that I cannot get rid of other than manually editing the HTML files is references to 3 Java scripts at the top of the HTML page (i.e. helpman_topicinit.js), that reside in the same folder.

My question is this: Looking out in the future, is there any issue with HTML pages viewed in the HTMLView that have calls to Javascript if I try to get this app into the MAS someday?[/quote]

You should be cool.

Thanks Michel, I’ve leave them in for now and not worrying about taking them out unless I absolutely need to later on.

In Windows you would place the js libraries next to the executable. In Mac, they are to go in the Resources folder inside the bundle, which is pretty easy : just drag them into the project. Then point to them using TPSpecialFolder from Tim Parnell at http://timi.me/xojo/ and use URLPath in your HTMLViewer. It should work out of the box.

Usually such libraries do not need to be written, but if that was the case, copy them to the AppplicationData folder before they are used.

OK. thanks. Still creating content, I’ll revisit this when I set it up for deployment.

I have used the HTMLviewer for a project and it seems to be completely compatible with Javascript and all browser functions. One fellow developer reported performance issues with an HTML5 game but this is an exception because probably the game needs optimization.
You can bundle your javascript as Michel pointed out or, if your app has internet access, you can reference external libraries (stored in some internet server)

Thanks for the response Julio, my questions is really about how the MAS store will view javascript in a sandboxed app. I’m not really having deployment or performance issues.

Is the Java Script included in the Application bundle or hosted online? If it’s included in the bundle, it may need to be code signed.

It would be in the App bundle. Starting to think it really just easier to remove it from the help files, it doesn’t really do anything critical, just gets automatically generated by the Help Authoring tool to toggle text topics and things like that.

I’ve used embedded javascript in my help files before without a hitch, but it’s within the HTML document and not a separate file.