Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Get contents of webviewer after changing DOM with Javascript?

Featured Replies

  • Newbies
I'm trying to use TinyMce in a webviewer in FileMaker but save the resulting HTML into a database field.
 
I am aware of the standard practice of using an fmp:// link with a script & parameter, but that won't work in Windows (the html content returned as the parameter will likely exceed the 2048 character limit).
 
I am using a javascript function to change the HTML DOM by putting the contents of the TinyMCE editor into another div on the page when the user clicks "Submit" inside the webviewer. However, when I use `GetLayoutObjectAttribute ( "webviewer" ; "Content" )` it shows the content of the unmodified (pre-javascript altered) page, not the page after javascript has modified the DOM.
 
Sample file: http://cris.lc/sxti2
 
Is this expected behavior? Am I doing something incorrectly?

 

However, when I use `GetLayoutObjectAttribute ( "webviewer" ; "Content" )` it shows the content of the unmodified (pre-javascript altered) page, not the page after javascript has modified the DOM.

 

Did you use that function in a script or in a calculated field?

GetLayoutObjectAttribute ( "webviewer" ; "content" )

is the equivalent of 'View Page Source' - so no access to the DOM.

 

 

Have you thought of exploring HTML5's file-saving capability?

Hi Cristo, and welcome to the Forum,

 

Sample file: http://cris.lc/sxti2

 

Please post your files here. This is a learning site, and files posted at other sites have a tendency to disappear once the OP has gotten a solution to their problem. To attach a file, just follow the steps in this Article. ATTACH FILE

  • 1 month later...

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.