This is fixed. I had to put Alerts in the JS in order to isolate the issue. I found that the Ajax call to the Universal Display File program that was the issue. Because the mobile client is connecting over a public network, I had to qualify the URL.
However, once I did this, I noticed sporadic issues. The async call was causing a delay. The Go button on the app was sending Enter back to the program and the data was being validated before the Ajax call returned the value to the field. So, I had to disable the Enter key in the record format. Now it works.
Thanks for the help, folks.
Getting Javascript to Load in Mobile Client
-
- Experienced User
- Posts: 140
- Joined: Wed Sep 14, 2016 2:58 pm
- First Name: Mark
- Last Name: Walter
- Company Name: Paragon Consulting Services
- Contact:
-
- Experienced User
- Posts: 140
- Joined: Wed Sep 14, 2016 2:58 pm
- First Name: Mark
- Last Name: Walter
- Company Name: Paragon Consulting Services
- Contact:
Re: Getting Javascript to Load in Mobile Client
Ok, I thought this was working. Well, it is working in the mobile client now, but not from Atrium. I'm getting the same error on the URL in the Ajax call. Any ideas how to get this to work from both environments?
-
- Experienced User
- Posts: 2711
- Joined: Wed Aug 01, 2012 8:58 am
- First Name: Scott
- Last Name: Klement
- Company Name: Profound Logic
- City: Milwaukee
- State / Province: Wisconsin
Re: Getting Javascript to Load in Mobile Client
Atrium doesn't really run your programs. It's a menu system that either launches a Rich Display or Genie session in a tab.
You should, therefore, be able to run the exact same program directly in a Rich Display or Genie session. This isn't really "necessary", but will make debugging simpler because there will be less going on in the same web page, so is highly recommended for debugging problems.
Once you've got the problem reproduced in browser in a regular session, use the browser's built-in debugging tools to determine what's happening. There will be a "Network" tab (or similar, different browsers use different names) that shows each HTTP request that's made, and one of them will be the AJAX request. Any errors that are occuring will be shown there. Also, you'll be able to see what is sent and received for that AJAX request, which is often very useful in determining problems.
You should, therefore, be able to run the exact same program directly in a Rich Display or Genie session. This isn't really "necessary", but will make debugging simpler because there will be less going on in the same web page, so is highly recommended for debugging problems.
Once you've got the problem reproduced in browser in a regular session, use the browser's built-in debugging tools to determine what's happening. There will be a "Network" tab (or similar, different browsers use different names) that shows each HTTP request that's made, and one of them will be the AJAX request. Any errors that are occuring will be shown there. Also, you'll be able to see what is sent and received for that AJAX request, which is often very useful in determining problems.
-
- Experienced User
- Posts: 140
- Joined: Wed Sep 14, 2016 2:58 pm
- First Name: Mark
- Last Name: Walter
- Company Name: Paragon Consulting Services
- Contact:
Re: Getting Javascript to Load in Mobile Client
Ok, I did this. The Status is Failed. However, when I right click/Open in a New Tab on the URL in the Name column, the call returns the correct JSON. So obviously, the browser can resolve the URL.
-
- Experienced User
- Posts: 140
- Joined: Wed Sep 14, 2016 2:58 pm
- First Name: Mark
- Last Name: Walter
- Company Name: Paragon Consulting Services
- Contact:
Re: Getting Javascript to Load in Mobile Client
Got this resolved. It seems that the shortcut to the Start menu was an IP address. The url was a QDN. The browser didn't see them as the same, so it refused the request.
THanks for your help.
THanks for your help.
Who is online
Users browsing this forum: No registered users and 5 guests