Web Viewer Problem
Is there a way to make FMP web viewer recognize your URL without entering the http://?
e.g. when using www.google.com instead of http://www.google.com?
FMP11 for Mac
The web viewer URL box is a calculation box that can combine data from fields in your current record. If you want you can set the web viewer to use this expression:
"http://" & yourTable::URLTextField
In which case, you can type or paste "www.google.com" into this text field and the calculation will add the missing text to the URL. You can even use an If function to test for the presence of "http://" in the text field and supply it only if it was not typed into this field.
It is also possible to use the "data URI schema", which allows composing html directly in the web viewer, making html pages on the fly using data pulled directly from the database. This works great for simple html pages. For example, if you want to incorporate latitude and longitude data from your database to show a map using a web viewer object, you could set the web viewer to the following (either directly or through a global variable):
"data:text/html, <html> <body bgcolor='#FFFFFF' TopMargin='0' style='border:0'> <iframe width='" & GetLayoutObjectAttribute ( "MAPVIEWER" ; "width" ) - 10 & "'height='" & GetLayoutObjectAttribute ( "MAPVIEWER" ; "height" ) - 10 & "'frameborder='0' scrolling='15' marginheight='0' marginwidth='0' src='http://maps.google.com/maps?q=" & TABLE::LATITUDE & "," & TABLE::LONGITUDE & "&output=embed&iwloc=0'> </iframe> </body> </html> "
Of course, substitute your web viewer's object name (the name of the web viewer in the Position tab of the Inspector for the Layout) for "MAPVIEWER" and the names of your fields containing the latitude and longitude data for TABLE::LATITUDE and TABLE::LONGITUDE, respectively.
Retrieving data ...