Jump to content
Sign in to follow this  

Insert modified HTML code back into WebViewer, with JS and images

Recommended Posts

Hi, I have run into a standstill here where maybe someone could point me in the right direction.  This is for a large personal project that I have been working on for a few years.  I have considered all the possibilities with FM and looked at add-ons, but this is the first time I think I cannot find an answer. 


I have used the Webviewer just to navigate through a website to get to a certain page to scrape.  That works great.


In this usage, I want to do more than just scrape.  I want to load the page in FM (on the webviewer), take the "content" (client-side HTML), run it through a comparative analysis in FM, append text to it line-by-line, and then reload that back into the Webviewer. 


The only problem is that the reload process always causes the Webviewer to get rid of any other website files, in particular Javascript files, which this web page needs in order work correctly.


Right now I am working around this by using an earlier (alternate) version of my script.  I first open the web page using the web browser Opera, cut and paste the HTML from that using the Windows clipboard, dump it into a global text field in FM, run my script on that, then cut and paste that back into Opera and click Update, which replaces the HTML but leaves everything else alone. 


Is there any way I could use the Filemaker Webviewer (or possibly some plug-in) to do similar - only replace the HTML, but leave all the other website files (javascript) as-is??  It has to be using some sort of web viewer, as I will manually be selecting options from the updated web page and submitting to a local web server.




Share this post

Link to post
Share on other sites

Well never mind, it wasn't anything to do with Filemaker.  Upon further investigation it was because HTML pages use relative paths to the files on the server, so I changed them to absolute paths.  Now when the HTML originates from Filemaker's Webviewer, it properly loads most of the files. There are still some minor issues, not related to the usage of the Webviewer, so I will go to other places to resolve those.

Share this post

Link to post
Share on other sites

Okay, just to update in case anyone is following along.  What worked out for me was to incorporate the HTML "Base" tag into the header of the HTML file which I am using Filemaker to edit.  Probably nobody else in the world is doing exactly what I did, but that made it work perfectly.  So I ended up ditching the Absolute Paths and just using HTML's Base tag to establish the correct Relative path back to the web server after the original relative path was broken (from it being loaded up and originating from FM this time) after the edits/enhancements. :)


I am only using FM9 ADV and 360Works Scriptmaster (free).  That all that was necessary.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By Richard Carlton
      We have a new fix for Google Maps in FMSP & the FMI Contacts Starter Solution
      Vid 1 - Getting your API Key:

      Vid 2 - FMI Contacts Starter Solution Fix

      Vid 3 - FMSP Fix

      Get up to speed with the FileMaker Video Training Course!
      FileMaker is a cross-platform relational database application from FileMaker Inc. https://en.wikipedia.org/wiki/FileMaker
      Top Rated Course by FileMaker Expert, Richard Carlton.
      Customer relationship management, processes implemented to manage a company's interactions with customers and prospects
      Experience Richard's dynamic and exciting teaching format, while learning both basic, intermediate, and advanced FileMaker development skills. With 26 years of FileMaker experience and a long time speaker at FileMaker's Developer Conference, Richard will teach you all the ins and outs of building FileMaker Solutions.
      The course is 50 hours of video content!
      Richard has been involved with the FileMaker platform since 1990 and has grown RCC into one of the largest top tier FileMaker consultancies worldwide.
      Richard works closely with RCC's staff: a team of 28 FileMaker developers and supporting web designers.
      He has offices in California, Nevada, and Texas.
      Richard has been a frequent speaker at the FileMaker Developers Conference on a variety of topics involving FileMaker for Startups and Entrepreneurs, and client-server integration.
      Richard is the Product Manager for FM Starting Point, the popular and most downloaded free FileMaker CRM Starter Solution.
      Looking for FM Starting Point free software download: http://www.fmstartingpoint.com
      Richard won 2015 Excellence Award from FileMaker Inc (Apple Inc) for outstanding video and product creation, leading to business development.
      RCC, Filemaker Videos, and LearningFileMaker.com are headquartered in Santa Clara, CA.
      Contact us at support@rcconsulting.com
      FileMaker Pro is simply a powerful software used to create custom apps that work seamlessly across iPad, iPhone, Windows, Mac, and the web
      Transform your business with the FileMaker Platform
      Free FileMaker Training Videos Channel https://www.youtube.com/user/FileMakerVideos
      FileMaker Training -FileMaker Video Training Course-FileMaker News-FileMaker Experts
      FileMaker What's New-Top Ten Things To Know About FileMaker -FileMaker News
      Sharing a FileMaker Solution-The Basics-Sharing FileMaker Database-FileMaker Experts
      A database management system (DBMS) is a computer software application that interacts with the user, other applications, and the database itself to capture and analyze data
      Official site SDK, Developer's Guide, Reference, and Android Market for the open source project
      Video introduction to iOS App Training https://www.youtube.com/watch?v=cVxQe_yAshw
      Free FileMaker videos check out ...http://www.filemakervideos.com
      Download the FileMaker Pro & FileMaker GO for mobile devices training videos at http://www.learningfilemaker.com
      Download FileMaker Go video training at http://learningfilemaker.com/FMGO-17/index.php
      Download FileMaker Full Video Training Bundle at http://learningfilemaker.com/subscription.php
      Learn how to use FileMaker to create an app with the FileMaker Training Series
      Comment, Like & Share All of Our Videos.
      Feel Free to Embed any of Our Videos on Your Blog or Website.
      Follow Us on Your Favorite Social Media
    • By Jhon Doe
      Hi everyone
      i'm new in filemaker, i'm using filemaker 17 and currently i'm involve in a proyect but i have a problem that i can't resolve, maybe someone of you have had the same problem.  
      I'm saving images in base64 format in a database to show them in a layout with web viewer,that doesn't has any problem, the problem is that i'm using a portal and i didn't know that portals don't support web viewer. I have to display those images but i can't remove the portal since i didn't do that layout and it has scripts using it along with the portal, is there a way to show images saved in base64 without use web viewer? (I've already tried to use container field but it only show a "?" image 😓 )
      My English is not the best but I tried my best ,Thanks for your help
    • By kigmaker
      I would like to use UUIDdecimal CF for the taskID rather than an auto-enter Serial Number. However I get Integer Notation like this:
      2.25640703445567e+37, rather than a number like this:
      I have toyed with other implementations of FullCalendar and have gotten it to work, but the related libraries were different versions and I can't recall how I solved the same problem then.
      How can I solve this?
      "allDay" : false,
      "color" : "#FF0000",
      "end" : "2018-05-30T23:00:00**TIMEZONE**",
      "id" : 9,
      "start" : "2018-05-30T21:00:00**TIMEZONE**",
      "title" : "New Task"
      "allDay" : false,
      "color" : "#E69138",
      "end" : "2018-06-01T23:30:00**TIMEZONE**",
      "id" : 2.25640703445567e+37,
      "start" : "2018-06-01T22:30:00**TIMEZONE**",
      "title" : "Old Task"
    • By megalomania
      Hello, everyone. I have a question.
      I have web viewer object named "web". If I start a script running, Every 5 seconds, it fetches the string from the HTML that is shown in the web viewer, and keeps creating new records.
      Just like this 
      GetLayoutObjectAttribute ( "web" ; "content" ) Then the target value always get refreshed every 5 seconds.
      javascript is just like this
      function updateLastvalue(new_last_value){ var current_last_value = $('.last-value').text(); var fixed_last_value = Number(new_last_value).toFixed(8); $('.last-value').text(fixed_last_value); // update document.title = fixed_last_value"; } and the number that I want to fetch but it changes every 5 seconds is just like this
      <td><span class="last-value”>297</a></td> How can I take out this 297 and another numbers that continues changing?
      GetLayoutObjectAttribute ( "web" ; "content" ) takes out only the number that was shown first. 
      Can anyone help me with this?
    • By Quito
      I have a database with +1000 records, each with a long list of long/lat coordinates that need to be reversed to lat/long.  The amount of decimal numbers is not fixed, yet every longitude value starts with an opening bracket "[" and is separated from the Lat value by a comma ",". Each coordinate ends with a closing bracket "]," and a carriage return.
      I guess if it were just one coordinate I could do it with left, middle and right. Hope someone can ease me towards a solution.

  • Create New...

Important Information

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