FP2002 continually adds code

N

Nathan

I have a form and for some reason, FP puts a closing form
tag immediately after the opening form tag. This, of
course, renders the form useless. Not only that, but it
screws up the rest of my page for some reason. If I
remove the closing form tag, it will replace it when I
either view the preview or save the file.

I thought FP2002 was big on not changing code anymore.
WHat's up?
 
T

Terry Crowley \(MSFT\)

There was a bug in this area in the RTM version of FP2002 that was later
fixed in a service pack. You might check on officeupdate to see if you're
up-to-date.

Or you can fix the HTML. The bug occurs when the <form> tag is misnested
with respect to other structural tags, e.g.

<form>
<div>
</form>
</div>

The fix is to make sure your <form></form> tags are well-nested with respect
to the other content on the page.

Terry
 
J

Jens Peter Karlsen [FP MVP]

A Form must have a closing tag. If there are no form elements, the
closing tag will be right after the opening tag.
Check if the opening tag isn't extraneous.
Post an URL if in doubt.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
S

Stefan B Rusynko

Actually not a bug, since that is an illegal html block nesting

Illegal - so FP will close the form
<form>
<div> or any other block level html tag - say <table>
form content
</form>
</div> or any other block level html tag - say </table>


Legal - so FP will accept the form
<form>
<div> or any other block level html tag - say <table>
form content
</div> or any other block level html tag - say </table>
</form>
Or
<div> or any other block level html tag - say <table><tr><td>
<form>
form content
</form>
</div> or any other block level html tag - say ></td> and other cells or </tr></table>




| There was a bug in this area in the RTM version of FP2002 that was later
| fixed in a service pack. You might check on officeupdate to see if you're
| up-to-date.
|
| Or you can fix the HTML. The bug occurs when the <form> tag is misnested
| with respect to other structural tags, e.g.
|
| <form>
| <div>
| </form>
| </div>
|
| The fix is to make sure your <form></form> tags are well-nested with respect
| to the other content on the page.
|
| Terry
|
| | > I have a form and for some reason, FP puts a closing form
| > tag immediately after the opening form tag. This, of
| > course, renders the form useless. Not only that, but it
| > screws up the rest of my page for some reason. If I
| > remove the closing form tag, it will replace it when I
| > either view the preview or save the file.
| >
| > I thought FP2002 was big on not changing code anymore.
| > WHat's up?
|
|
 
T

Terry Crowley \(MSFT\)

No, it definitely was a bug (I should know - I fixed it). While HTML
requires FORM tags to be well-nested, the browsers don't. Many hand-coded
pages have these kind of defects since web developers often throw the <form>
tag right before the first form control, which is often already nested
within a set of tables for layout purposes. Then they either throw the
</form> tag before the </body> or omit it altogether. It's also often the
case that it will be misnested within a series of table tags and if they
don't have a code editor that makes it easy to match start and end tags, it
can be hard to get the placement correct. If you're simply testing the page
in the browser, everything "works", so there's no reason to believe anything
is wrong.

But the bottom line with this bug was that they had a working page, opened
it in FP, saved it and it no longer worked. This type of behavior
engendered enormous frustration. So we've worked extremely hard to stamp it
out completely. FrontPage will generate well-formed pages, but if you have
an existing page, we work extremely hard to not change anything unless you
ask us to.

Another reason why we don't try to fix this is that in the face of
hand-scripted ASP, there's no way for us to guarantee that the final HTML
output won't be fine once its been executed. We can provide tools (like the
code view tag matching tools in FP2003, or the "reformat HTML" command) to
help you clean it up, but doing it automatically is just wrong.

Terry



Stefan B Rusynko said:
Actually not a bug, since that is an illegal html block nesting

Illegal - so FP will close the form
<form>
<div> or any other block level html tag - say <table>
form content
</form>
</div> or any other block level html tag - say </table>


Legal - so FP will accept the form
<form>
<div> or any other block level html tag - say <table>
form content
</div> or any other block level html tag - say </table>
</form>
Or
<div> or any other block level html tag - say <table><tr><td>
<form>
form content
</form>
</div> or any other block level html tag - say ></td> and other
 
S

Stefan B Rusynko

Terry
I'm not questioning your work on FP, but IMHO it should not be classified as a bug
I agree as FP evolved it got better at spotting such bad code and a page that "worked" - albeit w/ bad code - would suddenly not
work if FP "corrected" the bad coding
Some Browsers are very tolerant of bad html and others aren't, but a devloper should know and respect proper html coding - or be
warned that the coding will not stand the test of time

Agree it's an admirable attempt to ignore poor html practices of users, but if you get FP to ignore user bad html practices,
eventually the user will get into trouble w/ that malformed code in a browser
or the user will even then complain that the page does not validate!

Even Client side language coding should result in valid html structure. Plus, doesn't that sort of bad coding practice (or error)
become almost impossible to ignore the bad html coding as you move toward XHTML amd XML (both of which must be well formed)

IMHO if the goal is for FP to ignore the bad coding, it should at least inform the user the page has invalid coding if it is going
to leave it alone



| No, it definitely was a bug (I should know - I fixed it). While HTML
| requires FORM tags to be well-nested, the browsers don't. Many hand-coded
| pages have these kind of defects since web developers often throw the <form>
| tag right before the first form control, which is often already nested
| within a set of tables for layout purposes. Then they either throw the
| </form> tag before the </body> or omit it altogether. It's also often the
| case that it will be misnested within a series of table tags and if they
| don't have a code editor that makes it easy to match start and end tags, it
| can be hard to get the placement correct. If you're simply testing the page
| in the browser, everything "works", so there's no reason to believe anything
| is wrong.
|
| But the bottom line with this bug was that they had a working page, opened
| it in FP, saved it and it no longer worked. This type of behavior
| engendered enormous frustration. So we've worked extremely hard to stamp it
| out completely. FrontPage will generate well-formed pages, but if you have
| an existing page, we work extremely hard to not change anything unless you
| ask us to.
|
| Another reason why we don't try to fix this is that in the face of
| hand-scripted ASP, there's no way for us to guarantee that the final HTML
| output won't be fine once its been executed. We can provide tools (like the
| code view tag matching tools in FP2003, or the "reformat HTML" command) to
| help you clean it up, but doing it automatically is just wrong.
|
| Terry
|
|
|
| | > Actually not a bug, since that is an illegal html block nesting
| >
| > Illegal - so FP will close the form
| > <form>
| > <div> or any other block level html tag - say <table>
| > form content
| > </form>
| > </div> or any other block level html tag - say </table>
| >
| >
| > Legal - so FP will accept the form
| > <form>
| > <div> or any other block level html tag - say <table>
| > form content
| > </div> or any other block level html tag - say </table>
| > </form>
| > Or
| > <div> or any other block level html tag - say <table><tr><td>
| > <form>
| > form content
| > </form>
| > </div> or any other block level html tag - say ></td> and other
| cells or </tr></table>
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| | > | There was a bug in this area in the RTM version of FP2002 that was later
| > | fixed in a service pack. You might check on officeupdate to see if
| you're
| > | up-to-date.
| > |
| > | Or you can fix the HTML. The bug occurs when the <form> tag is
| misnested
| > | with respect to other structural tags, e.g.
| > |
| > | <form>
| > | <div>
| > | </form>
| > | </div>
| > |
| > | The fix is to make sure your <form></form> tags are well-nested with
| respect
| > | to the other content on the page.
| > |
| > | Terry
| > |
| > | | > | > I have a form and for some reason, FP puts a closing form
| > | > tag immediately after the opening form tag. This, of
| > | > course, renders the form useless. Not only that, but it
| > | > screws up the rest of my page for some reason. If I
| > | > remove the closing form tag, it will replace it when I
| > | > either view the preview or save the file.
| > | >
| > | > I thought FP2002 was big on not changing code anymore.
| > | > WHat's up?
| > |
| > |
| >
| >
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top