Jump to content
Server Maintenance This Week. ×

WebViewer exceeding bounding box


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

Recommended Posts

I have two web viewers, showing custom code generated based on field objects. Each was working perfectly yesterday. Today, for no reason I can discover, they are both exceeding the bottom border of their bounding boxes (in the picture, they bottom edges are in the blue bar but should stop within the white box above that).

I've tried changing their size (both bigger and smaller) with no change in symptoms.

Creating a new web viewer with the same calculation as the content Did fix the problem, though.

Any ideas on how I can avoid this in the future? I can't find anything about it on the web (though I may not have used the necessary terminology correctly - this is my first attempt using web viewers for manually created code).

Thanks!

Matthew

Screen shot 2011-06-27 at 4.06.55 PM.png

Link to comment
Share on other sites

One additional note: the WebViewer elements are layered behind all other elements on the page except the background box. And are still showing up overlapping the elements below them (but not always...<sigh>...I hate intermittent problems).

Any suggestions gratefully welcomed!

Link to comment
Share on other sites

A web viewer object is always in the front (unless it's empty).

Oh, I didn't know that. So in layout mode you can layer it behind all other elements, but that's not how FM treats it in browse mode? -Just tested and confirmed this for myself...<sigh>. So, sorry for the newbie question: any idea why it would exceed the bounds I defined for it? Is that "expected" behavior, too? (I wish I knew more about these things!).

Link to comment
Share on other sites

Follow-up: even weirder, further testing revealed that it is related to the content. Showing the border revealed that the web viewer bounds were exactly where I'd placed them; the internal white space (content) was overlapping the border of the viewer! Copying the web address definition and pasting into a new web viewer resulted in the same problem. Pasting into a text editor and then copying and pasting back into a new web viewer solved the problem. I have two of these viewers right next to each other, each displaying different content; previously had trouble with both but today only the one on the left is overlapping.

In case it helps resolve this, here is the code in the web address definition:

WebviewerHTMLData ( Null ; Null ;

	

	// css

	HTMLCSS ( 

		List (

			"* { font: 11px Georgia, serif; }";

			".header { font: 18px \"Trebuchet MS\", Arial, sans-serif; margin-top: 10px; margin-bottom: 2px; border-bottom: 1px solid #919191; }";

			"label { display: block; font-weight: bold; margin-left: -10px; }";

			".address, .phone, .email { margin-left: 20px; }"

		)

	); 



	// body

	List(

	If ( not IsEmpty ( $$PERSON.ADDRESS ) ; HTMLWrapTag ( "Addresses" ; "div" ; "class=\"header\"" ) );

	If ( not IsEmpty ( $$PERSON.ADDRESS ) ; RenderHTMLAddress ( $$PERSON.ADDRESS ) );

	If ( not IsEmpty ( $$PERSON.ADDRESS[2] ) ; RenderHTMLAddress ( $$PERSON.ADDRESS[2] ) );

	If ( not IsEmpty ( $$PERSON.ADDRESS[3] ) ; RenderHTMLAddress ( $$PERSON.ADDRESS[3] ) );

	If ( not IsEmpty ( $$PERSON.ADDRESS[4] ) ; RenderHTMLAddress ( $$PERSON.ADDRESS[4] ) );

	If ( not IsEmpty ( $$PERSON.ADDRESS[5] ) ; RenderHTMLAddress ( $$PERSON.ADDRESS[5] ) );	)

)

'WebviewerHTMLData, HTMLCSS, HTMLWrapTag, and RenderHMLAddress are custom functions from Matt Petrowsky over at filemakermagazine.com and filemakerstandards.org.

Link to comment
Share on other sites

This topic is 4689 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.