Re: [WSG] OT - maybe: quote or word of the day

2006-12-08 Thread David Hucklesby
Hi Bob,

You wrote:
>> I'm not being awkward but I still don't understand the issue here.
>>
>> document.write is not what is being served. Rather, it is part of a 
>> script that is serving html on the client side.
>>
>> What does javascript have to do the parsing of the xhtml?
>>
>> How else do I serve html using javascript?
>>

Ritmantas replied:
> document.write does not work when XHTML is treated as such, i.e. when 
> document is served with apropriate MIME type (application/xhtml+xml). You 
> can try for yourself, [...]

Possibly easier, just change the filename extension to "xhtml' and open the 
file locally. Opera 9 and Firefox 2, at least, accept this as an XML MIME 
type.

Cordially,
David
--




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread Chris Price

Rimantas Liubertas wrote:

I'm not being awkward but I still don't understand the issue here.

document.write is not what is being served. Rather, it is part of a
script that is serving html on the client side.

What does javascript have to do the parsing of the xhtml?

How else do I serve html using javascript?


document.write does not work when XHTML is treated as such, i.e. when
document is served with
apropriate MIME type (application/xhtml+xml).

These will provide you some more information:

http://www.w3.org/MarkUp/2004/xhtml-faq#docwrite
http://ln.hixie.ch/?start=1091626816&count=1
http://www.hixie.ch/advocacy/xhtml
http://lachy.id.au/log/2005/12/xhtml-beginners
http://www.456bereastreet.com/archive/200501/the_perils_of_using_xhtml_properly/ 




Thanks Rimantas

That is extremely helpful and enlightening.

--
Chris Price



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread Jacqualine Rippy
Dear Bob:
   
  When I designed my own personal website, I actually used one that was offered 
by Javascript.com.  It was easy to download and I actually entered some of my 
favorite quotes.  After I added a quote for each day of the week, which they 
can it actually looks really nice.  I will send you an example of the script, 
which is free to use.
   
  Sincerely,
   
  Jacqualine Rippy

Designer <[EMAIL PROTECTED]> wrote:
  I am after a simple 'quote of the day' or 'word of the day' type thing 
for a client. Naturally, I want it to be xhtml compliant, and easily 
formatted by me.

My initial search hasn't produced anything worth having. Can anyone 
recommend something?

Many thanks

-- 
Best Regards,

Bob McClelland

Cornwall (UK)
www.gwelanmor-internet.co.uk




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***




  "To truly love another simply means that you must first forge a 
common bond between two unique, yet separate individuals.  For only thenÂ…will 
you experience and understand the true essence of love."  ~~Purple Wolf~~  
http://www.jayepurplewolf.com/main.html   
 





 
-
Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.

***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread Rimantas Liubertas

I'm not being awkward but I still don't understand the issue here.

document.write is not what is being served. Rather, it is part of a
script that is serving html on the client side.

What does javascript have to do the parsing of the xhtml?

How else do I serve html using javascript?


document.write does not work when XHTML is treated as such, i.e. when
document is served with
apropriate MIME type (application/xhtml+xml).
You can try for yourself, go to
http://software.hixie.ch/utilities/cgi/content-type-proxy/content-type-proxy
enter http://choctaw.co.uk/tftw.php?counter=45 as "Location" and
application/xhtml+xml as "Content-type". Submit and check what you
get... Don't pay attention to missing styling, that's
not important in this case.

These will provide you some more information:

http://www.w3.org/MarkUp/2004/xhtml-faq#docwrite
http://ln.hixie.ch/?start=1091626816&count=1
http://www.hixie.ch/advocacy/xhtml
http://lachy.id.au/log/2005/12/xhtml-beginners
http://www.456bereastreet.com/archive/200501/the_perils_of_using_xhtml_properly/

Regards,
Rimantas
--
http://rimantas.com/


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread Chris Price

David Dorward wrote:

On Thu, Dec 07, 2006 at 03:48:46PM +, Chris Price wrote:

  
I don't understand why there is a problem with document.write and how 
that invalidates the XHTML. 



Using document.write doesn't invalidate the XHTML, there just aren't
any implementations of XHTML parsers that can handle document.write
(AFAIK).

I'm not being awkward but I still don't understand the issue here.

document.write is not what is being served. Rather, it is part of a 
script that is serving html on the client side.


What does javascript have to do the parsing of the xhtml?

How else do I serve html using javascript?

--
Chris Price



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread David Dorward
On Thu, Dec 07, 2006 at 03:48:46PM +, Chris Price wrote:

> I don't understand why there is a problem with document.write and how 
> that invalidates the XHTML. 

Using document.write doesn't invalidate the XHTML, there just aren't
any implementations of XHTML parsers that can handle document.write
(AFAIK).

On the other hand, hiding markup inside JavaScript just to get a page
to pass the validator is a very ugly hack ... and rather misses the
point of using valid code in the first place.

> Looking at the page called by the javascript I imagine I would have to 
> declare the parent page as transitional

Some of the generated markup doesn't conform to any standard.

> or can you have a transitional page inside an iframe and still
> declare the parent page strict?

No. iframe doesn't appear in Strict.

-- 
David Dorward  http://dorward.me.uk



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread Chris Price

David

Thanks for the comments.

The markup and css on the page in question both validate but obviously 
there is an issue with the javascript which contains markup which, as 
you say, certainly isn't compliant.


I don't understand why there is a problem with document.write and how 
that invalidates the XHTML. Is that markup?


Looking at the page called by the javascript I imagine I would have to 
declare the parent page as transitional or can you have a transitional 
page inside an iframe and still declare the parent page strict?


--
Chris Price

David Dorward wrote:

On Thu, Dec 07, 2006 at 12:41:57PM +, Chris Price wrote:
  

Is this any good?
http://choctaw.co.uk/tftw.php?counter=45
Javascript is used on the page so its xhtml compliant.



No, it isn't.

(1) Uses document.write. Most XHTML implementations don't support
document.write.

(2) The code that is document.written uses the  tag... which
isn't part of any XHTML standard I've seen.

(3) Said code also fails to represent ampersands with the &
entity.

(4)  is missing the end tag

(5) Iframes don't have marginwidth or marginheight attributes

(6) ... and so on.

Not to mention the obsolete and deprecated presentational markup.

And the style attributes containing invalid CSS that won't work
correctly in Standards mode in most browsers.

  



Kind Regards
--
Chris Price

Choctaw

[EMAIL PROTECTED]
http://www.choctaw.co.uk

Tel. 01524 825 245
Mob. 0777 451 4488


Beauty is in the eye of the beholder
while excellence is in the hand of the professional

~~~
-+- Sent on behalf of Choctaw Media Ltd -+-
~~~




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread Designer

Raena wrote:
On 12/7/06, *Designer* <[EMAIL PROTECTED] 
> wrote:


I am after a simple 'quote of the day' or 'word of the day' type thing
for a client. Naturally, I want it to be xhtml compliant, and easily
formatted by me.

My initial search hasn't produced anything worth having. Can anyone
recommend something?


What 'type thing' are you after?  Are you or your client hoping to 
provide your own quotes, or is it enough to get them from a Quote of 
the Day type of site?


It's not tricky (relatively speaking) to roll your own random quoter 
using PHP or something similar, since these sorts of things are 
routinely found in beginners' tutorials.



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*** 
Yeah, I did wonder about knocking up a simple string array (of quotes) 
in php (say around 20) and picking one at random to display. Surely 20 
would be enough?


If no-one comes up with something that is flexible and robust, that's 
what I'll do.


Thanks all.

--
Best Regards,

Bob McClelland

Cornwall (UK)
www.gwelanmor-internet.co.uk




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread Lachlan Hunt

David Dorward wrote:

On Thu, Dec 07, 2006 at 12:41:57PM +, Chris Price wrote:

Is this any good?
http://choctaw.co.uk/tftw.php?counter=45
Javascript is used on the page so its xhtml compliant.


No, it isn't.

(1) Uses document.write. Most XHTML implementations don't support
document.write.


Actually, no real XHTML implementation supports document.write().  In 
the current (X)HTML5 spec, document.write() must throw an error when 
used in XHTML.


| In an XML context, the document.write(s) method must raise an
| INVALID_ACCESS_ERR exception.

http://www.whatwg.org/specs/web-apps/current-work/#document.write1

--
Lachlan Hunt
http://lachy.id.au/


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread Raena

On 12/7/06, Designer <[EMAIL PROTECTED]> wrote:


I am after a simple 'quote of the day' or 'word of the day' type thing
for a client. Naturally, I want it to be xhtml compliant, and easily
formatted by me.

My initial search hasn't produced anything worth having. Can anyone
recommend something?



What 'type thing' are you after?  Are you or your client hoping to provide
your own quotes, or is it enough to get them from a Quote of the Day type of
site?

It's not tricky (relatively speaking) to roll your own random quoter using
PHP or something similar, since these sorts of things are routinely found in
beginners' tutorials.


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread David Dorward
On Thu, Dec 07, 2006 at 12:41:57PM +, Chris Price wrote:
> Is this any good?
> http://choctaw.co.uk/tftw.php?counter=45
> Javascript is used on the page so its xhtml compliant.

No, it isn't.

(1) Uses document.write. Most XHTML implementations don't support
document.write.

(2) The code that is document.written uses the  tag... which
isn't part of any XHTML standard I've seen.

(3) Said code also fails to represent ampersands with the &
entity.

(4)  is missing the end tag

(5) Iframes don't have marginwidth or marginheight attributes

(6) ... and so on.

Not to mention the obsolete and deprecated presentational markup.

And the style attributes containing invalid CSS that won't work
correctly in Standards mode in most browsers.

-- 
David Dorward  http://dorward.me.uk



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread Chris Price

Is this any good?

http://choctaw.co.uk/tftw.php?counter=45

Javascript is used on the page so its xhtml compliant.

--
Chris Price

Designer wrote:
I am after a simple 'quote of the day' or 'word of the day' type thing 
for a client. Naturally, I want it to be xhtml compliant, and easily 
formatted by me.


My initial search hasn't produced anything worth having. Can anyone 
recommend something?


Many thanks




Kind Regards
--
Chris Price

Choctaw

[EMAIL PROTECTED]
http://www.choctaw.co.uk

Tel. 01524 825 245
Mob. 0777 451 4488


Beauty is in the eye of the beholder
while excellence is in the hand of the professional

~~~
-+- Sent on behalf of Choctaw Media Ltd -+-
~~~




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] OT - maybe: quote or word of the day

2006-12-07 Thread Matthew Pennell

On 12/7/06, Designer <[EMAIL PROTECTED]> wrote:


I am after a simple 'quote of the day' or 'word of the day' type thing
for a client. Naturally, I want it to be xhtml compliant, and easily
formatted by me.



http://dictionary.reference.com/help/linking/wordoftheday-expert.html


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

[WSG] OT - maybe: quote or word of the day

2006-12-07 Thread Designer
I am after a simple 'quote of the day' or 'word of the day' type thing 
for a client. Naturally, I want it to be xhtml compliant, and easily 
formatted by me.


My initial search hasn't produced anything worth having. Can anyone 
recommend something?


Many thanks

--
Best Regards,

Bob McClelland

Cornwall (UK)
www.gwelanmor-internet.co.uk




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***