Jump to content

jQuery Mobile not loading on FileMaker Go Webviewer


Recommended Posts

I use jQuery and the jQueryUI slider widget to display a slider in FileMaker Pro (v17-17-18-19). Works fine but I also need to have it work on FileMaker Go, so I tried my luck on jQuery Mobile 1.4.5. The slider is working nicely on FileMaker Pro, but on FmGo 17, 18 or 19 it doesn't load, keeps displaying a spinning logo. When I publish the HTML page on a website and open it in Safari Mobile it works fine. Any help appreciated! See the example file: just downlaod it and open it on FMGo. The Webviewer and the HTML are displayed side by side.

sliderExample.fmp12

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Similar Content

    • By Richard Carlton
      Today we're covering the PerformScriptWithOptions JavaScript function with Calvin Mosiman. Learn about this new option for calling a FileMaker script from a web viewer! Future live streams: https://fmtraining.tv/#LIVE 
      support@rcconsulting.com
      www.fmtraining.tv
      www.fmstartingpoint.com
      www.rcconsulting.com 
    • By 360Works
      NOW AVAILABLE:
      fmPromise Presentation and Free Download!
      Thank you for your patience with the demonstration of fmPromise, a new free tool created to improve FileMaker and JavaScript integration.

      You can now watch the video presentation by Sam Barnum immediately at the 360Works YouTube Channel. Questions can be asked in the comment section below the video, or by emailing support@360works.com
      Free download available at the fmPromise page!
      More on 360Works fmPromise:
      We are now showcasing fmPromise, a brand new free tool created to improve JavaScript and FileMaker integration! Most people are aware that JavaScript in FileMaker can provide a much better UI within apps. While FileMaker 19 improved Web Viewer usage with JavaScript, 360Works is always looking for ways to build-in improvements to the FileMaker platform.
      FileMaker 19 has added the ability to call FileMaker scripts from your JavaScript, as well as executing a JavaScript function from a FileMaker script. This allows for integration between FileMaker and JavaScript in your Web Viewer, but has some areas that fmPromise will make better.
       
      Every call from JavaScript to a FileMaker script needs a public JavaScript function to receive the script response, and it is the responsibility of the Script to call that function. All data coming back from FileMaker is a string Debugging JavaScript errors is very difficult without browser-based dev tools The window.FileMaker object is not available right when the page loads, so you need a window.setTimeout() to wait for it to become available if you want to populate your web viewer using a script call.  
      fmPromise is designed to address these shortcomings, and help you utilize Web Viewers in your solution with the minimum amount of fuss.
      Tune In Remotely:
      Click here to watch the video presentation anytime!

      Click here to visit the fmPromise page and get your free download.
       
        Stay updated with 360Works
         
    • By ggt667
      I can ping my PDF document server from Terminal, I can connect to the PDF document server from all browsers apart from Safari, my default web browser is FireFox, I also tried to change to Chromium and Opera as the default web browser. WebViewer has the same symptoms as Safari, server not found.
      $ ping -nc 1 document PING document (10.0.0.7): 56 data bytes 64 bytes from 10.0.0.7: icmp_seq=0 ttl=64 time=0.002 ms --- document ping statistics --- 1 packets transmitted, 1 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 0.002/0.002/0.002/0.000 ms FileMaker says ’Couldnot connect to the server.’
       
      The issues is easily solved by creating a new MacOS X user, and log in to that user, however I would rather like to fix the current user not having to migrate all other application settings. Is there some dns cache specific to Web Viewer and Safari?
    • By St3v1e
      Hi,
      As a complete novice to FMP, I'm attempting my very first database. We rely on storing our contracts on Google & Dropbox. I've been trying to either embed the pdf's into a "tab", or (my preferred option) to have an "Add URL" button to link to the online pdf.
      I tried adding a field and copying and pasting the URL, but it's not clickable, and I'd need to add another field for each pdf/contract.
      Is there a better more efficient way to do this?
      Thanks
      Steve
    • By MonkeybreadSoftware
      Recently a client asked how to leverage JavaScript in FileMaker to do a specific calculation. For this blog post we replace the client's function with a CRC function to show you how to do it.
      Up until a few weeks ago we would have pointed to loading JavaScript in a web viewer and using WebView.RunJavaScript to run the JavaScript. But now we would point to WebView.Evaluate and just run it. See the example script in our documentation for this CRC function.
      With MBS FileMaker Plugin in version 10.0 we got our own JavaScript functions using the DukTape engine. We have an example in the documentation to run the CRC function right in a Let command and the JS.Evaluate command. But instead of initializing it each time in a Let statement, you may prefer to split this into three scripts, so you do the initialization only once.
      he following script initializes the JavaScript environment once and uses a call to JS.Evaluate to pass the JavaScript functions:
       
      If [ Length($$js) = 0 ] 
      Set Variable [ $$js ; Value: MBS( "JS.New" ) ] 
      Set Variable [ $r ; Value: MBS( "JS.Evaluate"; $$js; 
      "function makeCRCTable(){
              var c;
              var crcTable = [];
              for(var n =0; n < 256; n++){
                      c = n;
                      for(var k =0; k < 8; k++){
                              c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
                      }
                      crcTable[n] = c;
              }
              return crcTable;
      }
       
      function crc32(str) {
              var crcTable = crcTable || (crcTable = makeCRCTable());
              var crc = 0 ^ (-1);
       
              for (var i = 0; i < str.length; i++ ) {
                      crc = (crc >>> 😎 ^ crcTable[(crc ^ str.charCodeAt(i)) & 0xFF];
              }
       
              return (crc ^ (-1)) >>> 0;
      };") ] 
      End If
       
      As you see we store the JavaScript environment in a global $$js variable, so we can refer to it everywhere in this file. Instead of letting JS.Evaluate define the functions, we could alternatively use JS.AddFunction if you prefer:
       
      If [ Length($$js) = 0 ] 
      Set Variable [ $$js ; Value: MBS( "JS.New" ) ] 
      Set Variable [ $r ; Value: MBS( "JS.AddFunction"; $$js; "makeCRCTable"; "function makeCRCTable(){
              var c;
              var crcTable = [];
              for(var n =0; n < 256; n++){
                      c = n;
                      for(var k =0; k < 8; k++){
                              c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
                      }
                      crcTable[n] = c;
              }
              return crcTable;
      }") ] 
      Set Variable [ $r ; Value: MBS( "JS.AddFunction"; $$js; "crc32"; "function crc32(str) {
              var crcTable = crcTable || (crcTable = makeCRCTable());
              var crc = 0 ^ (-1);
       
              for (var i = 0; i < str.length; i++ ) {
                      crc = (crc >>> 😎 ^ crcTable[(crc ^ str.charCodeAt(i)) & 0xFF];
              }
       
              return (crc ^ (-1)) >>> 0;
      }") ] 
      End If
       
      Next we have a script to process data and use JS.CallFunction to run our function. This allows us to pass the argument as JSON data and avoid building JavaScript on the fly where wrong escaping could cause a JavaScript injection by an user:
       
      If [ Length($$js) > 0 ] 
      Set Variable [ $p ; Value: MBS( "JSON.CreateString"; test::Input) ] 
      Set Field [ test::Output ; MBS( "JS.CallFunction"; $$js; "crc32"; $p ) ] 
      End If
       
      When the solution closes you can cleanup the JavaScript environment:
       
      If [ Length($$js) > 0 ] 
      Set Variable [ $r ; Value: MBS( "JS.Free"; $$js ) ] 
      Set Variable [ $$js ; Value: "" ] 
      End If
       
      If you have questions, please do not hesitate to contact us.
       
      from CRC function in FileMaker using JavaScript
  • Who Viewed the Topic

    5 members have viewed this topic:
    guy.minder  derek0308  fishtech  normanicus  shredded 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.