Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Set the web viewer using $$var


This topic is 4252 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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?

Posted

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

Posted

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,

This topic is 4252 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

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