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.

Set the web viewer using $$var

Featured Replies

My $$var content exactly:

-------------------------------------------------

"data:text/html,
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>

  <head>

<script>
"& $$_jquery_js &"
</script>

<style type='text/css'>
mystyle    
</style>

  </head>

  <body >
my body
  </body>

</html>
"

---------------------------------------

Then the web viewer is set to the $$Var, this doesn't work.

 

But if i copy the content of the $$var directly in to the web viewer it work.

 

Please tell me were is the error.

Franco

I think this is about your "quotes" - the " character.

 

The web viewer must produce the exact code required, in this instance the leading (and trailing) quotes (") are required to resolve as quote (") characters.

 

You will need to 'escape' the " characters with """ for FileMaker to produce a single "

 

""" & <WebviewerCode> & """

 

Make sense?

  • Author

I made this test, but it doesn't work.

 

Then  i made these other tests

 

setting the $$Var in:

 

Data:.... <html>

Bla bla

</html>

 

 without the initial and final quote, the web viewer solve the problem.

 

-------------------------------------------------------------

if you set $$Var to

 

Data:.... <html> Bla bla

" & $$MyVar & "

</html>

 

 without the initial and final quote, the web viewer doesn't understand the break for the insertion of $$MyVar.

-------------------------------------------------------------

 

 

if you set $$Var to

 

"Data:.... <html> Bla bla

" & $$MyVar & "

</html>"

 

 with the initial and final quote, the web viewer doesn't work at all.

 

About the 'escape', i tested doing it for the initial and final quote but it doesn't work at all.

 

Thank for your attention

Franco

Hi, I too came across the same problem but this might be the problem is that while we are assigning the calculation data into a variable its consider all those characters as a normal text string (but you are supposing to enter the markup text).

 

But while you are directly writing the same inside the calculation box you are providing a  specifier for the data you are going to provide to web-viewer like here you are mentioned data:text/html this particular parameter is redirects the enter text to be consider as HTML  which can be view as a HTML view on web-viewer instead just as a normal text.

 

So please understand the concept, its little complex :-)

 

with regards,

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.