Caves Travel Diving Graphics Mizar Texts Cuisine Lemkov Contact Map RSS Polski
Trybiks' Dive Texts HTML </form> ... <form> YAC Software
  Back

List

Charsets

Charts

DBExpress

Delphi

HTML

Intraweb

MSTest

PHP

Programming

R

Rhino Mocks

Software

Testing

UI Testing

VB.NET

VCL

WPF

</form> ... <form>
While developing the YAC Interview Kit / GaduSonda applications in Delphi + IntraWeb (VCL for the Web), I ran into a small problem with page rendering under Opera. Namely, if you have two nested layout managers (TIWLayoutMgrHTML) on a form, e.g. one for rendering the page itself, another for rendering some part of the page, the generated HTML will contain nested <form> tags.

Firefox and IE7 seem to handle this correctly:



but in Opera you'll get something like this:



What happens is that when IntraWeb reads the contents of an HTML file for a layout manager, it strips everything before the <body> tag and after the </body> tag. Thus, it leaves everything inside those tags, including form definitions. Next, these get nested in the form definitions from the "parent" layout manager.

Unfortunately, TIWLayoutMgrHTML doesn't have a MasterFormTag property that TIWTemplateProcessorHTML has. So you can't easily turn off this tag in the generated HTML. However, there's a simple trick that fixes the above issue: in the child HTML source (the one that is used to generate the inner contents), just add </form> right after <body> and <form> right before </body>.

And voila!
Perfect rendering in all three browsers. :-)

Top

Comments
Alas!
No comments yet...

Top

Add a comment (fields with an asterisk are required)
Name / nick *
Mail (will remain hidden) *
Your website
Comment (no tags) *
Enter the text displayed below *
 

Top

Tags

HTML

Intraweb


Related pages

Intraweb and MaxConnections

Intraweb as an Apache DSO module

"Device not supported" in Intraweb

Fix for Highslide HTML Slides

Clicking on links in JavaScript

SessionTimeout in Intraweb

Using TChart with Intraweb

Calculating Positions of HTML Elements

CSS for Scrollbars on Pages and in Frames