|
Posted by Harlan Messinger on January 6, 2009, 5:22 pm
Please log in for more thread options
Jukka K. Korpela wrote:
show/hide quoted text
> Harlan Messinger wrote:
>
> [a lengthy quotation, always a useful warning signal, and then...]
>
>> Example: create a web page containing:
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
>> <p>Try this.
>> Load it in Firefox. "View source" will give you the above.
>
> Indeed. No surprise.
>
>> "View
>> generated source" will give you:
>> </head><body><p>Try this.
>> where Firefox will have created the required html, head, and body
>> elements in its internal model,
>
> That's mildly surprising, since what I intuitively expected "generated
> source" to contain is markup generated by execution of client-side
> scripting. And I think this is the most relevant and most useful feature
> of this function.
It does that too, also as a byproduct of churning out the HTML that
represents whatever is in the DOM tree at the moment. In fact, one will
notice that even for those tags that were in the original source, the
attributes aren't listed in the same order as in the original.
show/hide quoted text
>
> What's wrong in your statement is the word "required". The end tags are
> definitively optional by HTML 4.01 rules. You may have meant that they
> are "required" by the "internal model" of Firefox, but you did not say
> that at all and I don't think it's even true. There is no reason why
> explicit end tags would be "required" for an internal model, which is
> really a tree structure and has no tags whatsoever.
You're correct, it was a poor choice of word. I should have said it
generated *explicit* start and (where applicable) end tags for every
element included in the DOM, including the required elements not
explicitly expressed in the original.
|
|
Posted by Jonathan N. Little on January 6, 2009, 11:22 am
Please log in for more thread options
twiggy182 wrote:
show/hide quoted text
> 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 STUDIO
http://www.LittleWorksStudio.com
|
|
Posted by twiggy182 on January 6, 2009, 12:02 pm
Please log in for more thread options 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:
show/hide quoted text
<select>
<option value="0">Please make your choice
<optgroup label="My group">
<option value="1">A
<option value="2">B
<option value="3">C
<option value="4">D
</optgroup>
</select>
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...
I can't provide a URL because it is within a protected application,
and the page is very long...
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?
thanks
|
|
Posted by Mark Hansen on January 6, 2009, 12:10 pm
Please log in for more thread options On 01/06/09 09:02, 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). 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...
>
> I can't provide a URL because it is within a protected application,
> and the page is very long...
The standard practice is to create a sample page which illustrates the
problem and publish it to a free hosting service. I've used www.07x.net
for this purpose. It was really easy to set up and, or course, is free.
|
|
Posted by twiggy182 on January 6, 2009, 1:29 pm
Please log in for more thread options show/hide quoted text
> On 01/06/09 09:02, 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 t=
he
show/hide quoted text
> >> > "Source code". Because of that, the "<optgroup>" tag isn't recognize=
d
show/hide quoted text
> >> > at all in IE ( "</option>" tags are also missing in IE when I view t=
he
show/hide quoted text
> >> > 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 UR=
L
show/hide quoted text
> >> 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:
> > =A0 =A0 =A0 =A0 <option value=3D"0">Please make your choice
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 <option value=3D"1">A
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 <option value=3D"2">B
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 <option value=3D"3">C
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 <option value=3D"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...
> > I can't provide a URL because it is within a protected application,
> > and the page is very long...
> The standard practice is to create a sample page which illustrates the
> problem and publish it to a free hosting service. I've usedwww.07x.net
> for this purpose. It was really easy to set up and, or course, is free.
Hi Mark,
I wanted to created a sample but I can't reproduce this problem with a
plain html file.
My application uses Tomcat, Java and XSLT transformation. So it seems
that it triggers something in FF and IE that somehow convert le HTML
code generated by my application. When I say that they convert/modify
the code, I refer to the fact that the "source code" and "generated
source code" are different.
Thanks
|
| 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 |
|
>
> [a lengthy quotation, always a useful warning signal, and then...]
>
>> Example: create a web page containing:
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
>> <p>Try this.
>> Load it in Firefox. "View source" will give you the above.
>
> Indeed. No surprise.
>
>> "View
>> generated source" will give you:
>> </head><body><p>Try this.
>> where Firefox will have created the required html, head, and body
>> elements in its internal model,
>
> That's mildly surprising, since what I intuitively expected "generated
> source" to contain is markup generated by execution of client-side
> scripting. And I think this is the most relevant and most useful feature
> of this function.