Discussion: js write a <hr>
Afficher un message
Vieux 11/09/2007, 10h11   #5
Blinky the Shark
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: js write a <hr>

Blinky the Shark wrote:
> Steve Sobol wrote:
>> On 2007-09-11, Blinky the Shark <no.spam@box.invalid> wrote:
>>> Can't for the life of me figure out how to get a hr into a js write.
>>>
>>> http://blinkynet.net/humor/index.html
>>>
>>> I'd like a *scripted* <hr> just before the first line created by the

>>
>> document.write() won't work?

>
> As I said, it works, but it won't validate.
>
>>> But validation fails with a you-can't-use-a-<hr>-there error.

>>
>> So this would be an HTML issue, not a js issue. To which standard are you

>
> Call it what you'd like. As I stated, the problem is that I can't - via
> js - figure out how to get something to validate that validates when I
> do the same thing without the script. Putting an <hr> in the body
> (correct - not within a <p> or <div> validates, but it won't if js
> places it there.
>
>> writing? HTML 4 Transitional? Strict? XHTML Transitional? Strict?

>
> That's in my doctype. That kind of thing is why I gave the link.
>
> I've been bad: XHTML because when I did a total rewrite of the site a
> couple hears ago I thought that was The Coming Thing and wanted to not
> go backward; but served as HTML because then I learned that browser
> support was supposedly iffy for XHTML.


Here's test copy of that page with what I'm *trying* to do. See commented div.
When that <hr> is generated by a js document.write, it won't validate.
If I just put a <hr> in the same place in the page (in that div, or
just in the body without that div existing, the <hr> page validates.

http://blinkynet.net/humor/index2.html

Sorry I didn't link *this* before.

Again, I want the <hr> to be js-generated so that it's not there when js
is disabled -- in that case it's not needed because the whole
quote-of-the-day section isn't rendered.


--
Blinky RLU 297263
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org <----------- New Site Aug 28
  Réponse avec citation
 
Page generated in 0,06283 seconds with 9 queries