|
Posted by Jonathan N. Little on January 6, 2009, 1:45 pm
Please log in for more thread options
twiggy182 wrote:
show/hide quoted text
>> twiggy182 wrote:
>>> Hi,
>>> for some reasons, with the "Web Developper bar" in Firefox, I
>>> discovered that there are differences between the "Source code" and
>>> the "Generated source code" in my application.
>>> The main difference is that all my "</option>" tags are missing in the
>>> "Source code". Because of that, the "<optgroup>" tag isn't recognized
>>> at all in IE ( "</option>" tags are also missing in IE when I view the
>>> source code ).
>> Because you have made an error in your markup somewhere. Closing tags
>> for OPTION is optional in HTML and works in FF & IE.
>> Are you using XHTML? So the correct course of action is to supply a URL
>> to an online example that exhibits the problem.
<snip signature>
>
> Hi Jonathan,
>
> I know that closing tags for OPTION is optional, but it actually has
> an important impact if you use OPTGROUP!
>
> Have a look at this:
> <option value="0">Please make your choice
> <option value="1">A
> <option value="2">B
> <option value="3">C
> <option value="4">D
>
> Because the first option (which is at the root level) has no closing
> tab, all OPTGROUP are ignored because it's as if they where within the
> first OPTION (or something like that). Actually, I have this problem
> only with IE6 but I can't ignore it...The only workaround I see is to
> put the first option in a dummy group, but I don't like that very
> much...
Because your markup has an error in it...
All options visible in IE5-7*
<IE6 does not support OptionGroup
show/hide quoted text
IE6 shows option group when using closing </option> tag, else behaves
like 5.x
IE7 has not problem either way.
Solution: If you need the OptionGroup to show in IE6 then close your
option elements with a closing tag!
show/hide quoted text
>
> I can't provide a URL because it is within a protected application,
> and the page is very long...
Very lame and overused excuse. Create a stripped down demo page that
still exhibits the problem and upload it somewhere public then provide a
URL...
show/hide quoted text
>
> Ok, so is there an analyzer I could throw my HTML code in to know what
> is wrong with it, an why closing tags are removed?
It's not. Whatever you are using to generate the page is *not* inserting
the closing tag.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
|
|
Posted by Harlan Messinger on January 6, 2009, 4:03 pm
Please log in for more thread options
twiggy182 wrote:
show/hide quoted text
>> twiggy182 wrote:
>>> Hi,
>>> for some reasons, with the "Web Developper bar" in Firefox, I
>>> discovered that there are differences between the "Source code" and
>>> the "Generated source code" in my application.
>>> The main difference is that all my "</option>" tags are missing in the
>>> "Source code". Because of that, the "<optgroup>" tag isn't recognized
>>> at all in IE ( "</option>" tags are also missing in IE when I view the
>>> source code ).
>> Because you have made an error in your markup somewhere. Closing tags
>> for OPTION is optional in HTML and works in FF & IE.
>> Are you using XHTML? So the correct course of action is to supply a URL
>> to an online example that exhibits the problem.
>> --
>> Take care,
>> Jonathan
>> -------------------
>> LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com
>
> Hi Jonathan,
>
> I know that closing tags for OPTION is optional, but it actually has
> an important impact if you use OPTGROUP!
>
> Have a look at this:
> <option value="0">Please make your choice
> <option value="1">A
> <option value="2">B
> <option value="3">C
> <option value="4">D
>
> Because the first option (which is at the root level) has no closing
> tab, all OPTGROUP are ignored because it's as if they where within the
> first OPTION (or something like that).
It shouldn't work like that, because the browser is supposed to know
that an option can't contain an optgroup.
show/hide quoted text
> Actually, I have this problem
> only with IE6 but I can't ignore it...The only workaround I see is to
> put the first option in a dummy group, but I don't like that very
> much...
Sorry, can't help there. If IE6 has a problem with it, it's a bug, and
IE6 is still unfortunately a significant presence.
|
|
Posted by Harlan Messinger on January 6, 2009, 10:36 pm
Please log in for more thread options Harlan Messinger wrote:
show/hide quoted text
> twiggy182 wrote:
>>> twiggy182 wrote:
>>>> Hi,
>>>> for some reasons, with the "Web Developper bar" in Firefox, I
>>>> discovered that there are differences between the "Source code" and
>>>> the "Generated source code" in my application.
>>>> The main difference is that all my "</option>" tags are missing in the
>>>> "Source code". Because of that, the "<optgroup>" tag isn't recognized
>>>> at all in IE ( "</option>" tags are also missing in IE when I view the
>>>> source code ).
>>> Because you have made an error in your markup somewhere. Closing tags
>>> for OPTION is optional in HTML and works in FF & IE.
>>> Are you using XHTML? So the correct course of action is to supply a URL
>>> to an online example that exhibits the problem.
>>> --
>>> Take care,
>>> Jonathan
>>> -------------------
>>> LITTLE WORKS STUDIOhttp://www.LittleWorksStudio.com
>> Hi Jonathan,
>> I know that closing tags for OPTION is optional, but it actually has
>> an important impact if you use OPTGROUP!
>> Have a look at this:
>> <option value="0">Please make your choice
>> <option value="1">A
>> <option value="2">B
>> <option value="3">C
>> <option value="4">D
>> Because the first option (which is at the root level) has no closing
>> tab, all OPTGROUP are ignored because it's as if they where within the
>> first OPTION (or something like that).
>
> It shouldn't work like that, because the browser is supposed to know
> that an option can't contain an optgroup.
That's not actually the determining factor here--it's that the browser
can't form a proper DOM if elements intersect, and the solution to that
is generally to close the still-open element.
|
|
Posted by Jonathan N. Little on January 7, 2009, 10:42 am
Please log in for more thread options Harlan Messinger wrote:
show/hide quoted text
> That's not actually the determining factor here--it's that the browser
> can't form a proper DOM if elements intersect, and the solution to that
> is generally to close the still-open element.
But the point is it IS closed just as
show/hide quoted text
<p>One paragraph ...
<p>Another paragraph ...
The problem is IE6 gets it wrong when it does not see the optional
closing tag. It is not correct behavior, but it is easy to fix (for IE6)
by insuring that the close tag is present.
Now the OP believes that it is there and that the browser is removing
it. He is mistaken, for whatever reason his code, (CGI, XSL, or
whatever) is *not* inserting the closing tag. But since he seems
incapable of suppling a demo URL we cannot prove this.
Hint to OP: Another way to check this is to change your script to output
as "Content-Type: text/plain" or dump the output to a text log and see
the actual output.
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
|
|
Posted by Bergamot on January 7, 2009, 11:59 am
Please log in for more thread options
Jonathan N. Little wrote:
show/hide quoted text
>
> The problem is IE6 gets it wrong when it does not see the optional
> closing tag. It is not correct behavior, but it is easy to fix (for IE6)
> by insuring that the close tag is present.
Considering that IE6 doesn't even support the optgroup element, it makes
sense that it would not automatically close it when another element is
encountered. It does not know the correct nesting of these elements.
Take the OP's code (without closing tags) and change an optgroup tag to
"bogus". What does Firefox, Opera or Safari do with the unknown tag, and
the options that follow it?
--
Berg
|
| Similar Threads | Posted | | What's all that stuff in the source code? | August 25, 2004, 9:04 pm |
| better/easy way to displaying c source code in html | July 18, 2006, 5:44 am |
| Code added to my XHTML source files giving problems | November 18, 2005, 6:56 pm |
| Style tags -- Eeek how obese these tags make HTML! | November 8, 2006, 3:33 am |
| Meta Tags, Link Tags, other | September 27, 2005, 3:29 pm |
| Cant view source | September 10, 2004, 12:06 pm |
| Source CANNOT be viewed | December 3, 2009, 9:18 am |
| Simple Open Source CMS | January 23, 2006, 9:00 am |
| looking for open source forums..... | September 8, 2006, 5:48 pm |
| Web Standards Meets Open Source? | September 29, 2004, 11:57 pm |
|
>>> Hi,
>>> for some reasons, with the "Web Developper bar" in Firefox, I
>>> discovered that there are differences between the "Source code" and
>>> the "Generated source code" in my application.
>>> The main difference is that all my "</option>" tags are missing in the
>>> "Source code". Because of that, the "<optgroup>" tag isn't recognized
>>> at all in IE ( "</option>" tags are also missing in IE when I view the
>>> source code ).
>> Because you have made an error in your markup somewhere. Closing tags
>> for OPTION is optional in HTML and works in FF & IE.
>> Are you using XHTML? So the correct course of action is to supply a URL
>> to an online example that exhibits the problem.
<snip signature>
>
> Hi Jonathan,
>
> I know that closing tags for OPTION is optional, but it actually has
> an important impact if you use OPTGROUP!
>
> Have a look at this:
> <option value="0">Please make your choice
> <option value="1">A
> <option value="2">B
> <option value="3">C
> <option value="4">D
>
> Because the first option (which is at the root level) has no closing
> tab, all OPTGROUP are ignored because it's as if they where within the
> first OPTION (or something like that). Actually, I have this problem
> only with IE6 but I can't ignore it...The only workaround I see is to
> put the first option in a dummy group, but I don't like that very
> much...