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