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

List

Intraweb and MaxConnections

A Case for FreeAndNIL

Intraweb as an Apache DSO module

"Device not supported" in Intraweb

Automated GUI Testing

Fix for Highslide HTML Slides

Random()'s Determinism

Rounding and precision on the 8087 FPU

Clicking on links in JavaScript

PHP's mail()

File | Save Atavism

SessionTimeout in Intraweb

Using TChart with Intraweb

Unknown driver: MySQL

Automated GUI Testing in VMs

TIdMessage's CharSet

Product Peer Reviews - Introduction

Software Guarantees

Automated Testing of Window Forms

TChart - Missing Labels in Axes

Calculating Positions of HTML Elements

Memory Leaks and Connection Explosions in DBExpress

CSS for Scrollbars on Pages and in Frames

Controlling Conditional Defines and Compilation Switches

Turning Browser Caching off when Displaying Images Using PHP

Detecting Memory Leaks with DUnit

last_insert_id() and DBExpress

YAC Data Language

Registering Extensions

DBExpress and Thread Safety

Forms as Frames

Checking Dangling Pointers vs. the New Memory Manager

</form> ... <form>

Accessing Protected Members

</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