Re: [Proto-Scripty] Re: document.observe and Sorter in scrolling li sts

2009-12-08 Thread Niko Schwarz
I don't think so. head and body are both optional:

http://dev.w3.org/html5/spec/Overview.html#optional-tags

On Tue, Dec 8, 2009 at 1:24 AM, Rick Waldron waldron.r...@gmail.com wrote:
 Missing:

 head
 body

 If found, please return.

 -- Sent from my Palm Prē
 
 Niko Schwarz wrote:

 I don't know why, but somehow this snippet executes document.observe
 fine. I just open another script tag and suddenly the world is good.

 But the issue with the scrolling drag and drop remains. This code
 snippet should be executable in a browser as is, from a file (I can
 attach it as a file if that's easier, or host it on a website):

 !DOCTYPE html
 html lang=en
 script src=http://www.google.com/jsapi;/script
 script
 google.load(prototype, 1.6.1.0);
 google.load(scriptaculous, 1.8.3);
 /script
 script
 document.observe('dom:loaded',function() {
 Sortable.create('fruit', {
 scroll: container
 });
 });

 /script

 titleTest/title
 div id=container style=overflow: scroll; width: 200px; height: 100px;
 ul id=fruit
 liApple
 liBanana
 liPeach
 liStrawberry
 liCherry
 liPear
 liOrange
 liMango
 /ul

 Cheers,

 Niko

 On Mon, Dec 7, 2009 at 7:15 PM, Niko Schwarz
 niko.schw...@googlemail.com wrote:
 Hi, I have this tiny script, and it fails in two ways. First, the
 document observe thing fails really strangely, saying:

 TypeError: Result of expression 'document.observe' [undefined] is not
 a function.

 The second error, after I create the sorter on the command line: You
 cannot drag and drop the lower elements of the list.

 Here's the script:

 !DOCTYPE html
 html lang=en
 script src=http://www.google.com/jsapi;/script
 script
   google.load(prototype, 1.6.1.0);
   google.load(scriptaculous, 1.8.3);

   document.observe(dom:loaded, function() {
     Sortable.create('fruit', {
    scroll: container
    });});

 /script

 titleTest/title
 div id=container style=overflow: scroll; width: 200px; height:
 100px;
 ul id=fruit
    liApple
    liBanana
    liPeach
    liStrawberry
    liCherry
    liPear
    liOrange
    liMango
 /ul


 So, what is your take?


 Cheers,

 Niko


 --
 http://scg.unibe.ch/staff/Schwarz
 twitter.com/nes1983
 Tel: +41 076 235 8683




 --
 http://scg.unibe.ch/staff/Schwarz
 twitter.com/nes1983
 Tel: +41 076 235 8683

 --

 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 --

 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.




-- 
http://scg.unibe.ch/staff/Schwarz
twitter.com/nes1983
Tel: +41 076 235 8683

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.




Re: [Proto-Scripty] Re: document.observe and Sorter in scrolling li sts

2009-12-08 Thread Niko Schwarz
That is, the tags are, the elements are not. A title can only appear
in a head, that's why my document clearly has a head element – I don't
need to spell out the tag for that. And the head ends, and body
begins, with the first element that can only be found in body.

For example, validate this: http://snipt.net/nes1983/minimal-valid-html5/

In a HTML5 validator: http://html5.validator.nu/

It's valid. It saves space, no amount of confusion is caused by
dropping these tags, so I would argue that it's good practice, when
handcoding html, to drop the irrelevant things.

I just validated the snipped I'd sent, and I learned that I forgot
closing a div at the end of the snippet, otherwise it is valid. Here's
the snippet with the closing div, passes through an html5 validator:

!DOCTYPE html
html lang=en
script src=http://www.google.com/jsapi;/script
script
  google.load(prototype, 1.6.1.0);
  google.load(scriptaculous, 1.8.3);

  document.observe(dom:loaded, function() {
Sortable.create('fruit', {
   scroll: container
   });});

/script

titleTest/title
div id=container style=overflow: scroll; width: 200px; height: 100px;
ul id=fruit
   liApple
   liBanana
   liPeach
   liStrawberry
   liCherry
   liPear
   liOrange
   liMango
/ul
/div



Cheers,

Niko

On Tue, Dec 8, 2009 at 9:27 AM, Niko Schwarz
niko.schw...@googlemail.com wrote:
 I don't think so. head and body are both optional:

 http://dev.w3.org/html5/spec/Overview.html#optional-tags

 On Tue, Dec 8, 2009 at 1:24 AM, Rick Waldron waldron.r...@gmail.com wrote:
 Missing:

 head
 body

 If found, please return.

 -- Sent from my Palm Prē
 
 Niko Schwarz wrote:

 I don't know why, but somehow this snippet executes document.observe
 fine. I just open another script tag and suddenly the world is good.

 But the issue with the scrolling drag and drop remains. This code
 snippet should be executable in a browser as is, from a file (I can
 attach it as a file if that's easier, or host it on a website):

 !DOCTYPE html
 html lang=en
 script src=http://www.google.com/jsapi;/script
 script
 google.load(prototype, 1.6.1.0);
 google.load(scriptaculous, 1.8.3);
 /script
 script
 document.observe('dom:loaded',function() {
 Sortable.create('fruit', {
 scroll: container
 });
 });

 /script

 titleTest/title
 div id=container style=overflow: scroll; width: 200px; height: 100px;
 ul id=fruit
 liApple
 liBanana
 liPeach
 liStrawberry
 liCherry
 liPear
 liOrange
 liMango
 /ul

 Cheers,

 Niko

 On Mon, Dec 7, 2009 at 7:15 PM, Niko Schwarz
 niko.schw...@googlemail.com wrote:
 Hi, I have this tiny script, and it fails in two ways. First, the
 document observe thing fails really strangely, saying:

 TypeError: Result of expression 'document.observe' [undefined] is not
 a function.

 The second error, after I create the sorter on the command line: You
 cannot drag and drop the lower elements of the list.

 Here's the script:

 !DOCTYPE html
 html lang=en
 script src=http://www.google.com/jsapi;/script
 script
   google.load(prototype, 1.6.1.0);
   google.load(scriptaculous, 1.8.3);

   document.observe(dom:loaded, function() {
     Sortable.create('fruit', {
    scroll: container
    });});

 /script

 titleTest/title
 div id=container style=overflow: scroll; width: 200px; height:
 100px;
 ul id=fruit
    liApple
    liBanana
    liPeach
    liStrawberry
    liCherry
    liPear
    liOrange
    liMango
 /ul


 So, what is your take?


 Cheers,

 Niko


 --
 http://scg.unibe.ch/staff/Schwarz
 twitter.com/nes1983
 Tel: +41 076 235 8683




 --
 http://scg.unibe.ch/staff/Schwarz
 twitter.com/nes1983
 Tel: +41 076 235 8683

 --

 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 --

 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.




 --
 http://scg.unibe.ch/staff/Schwarz
 twitter.com/nes1983
 Tel: +41 076 235 8683




-- 
http://scg.unibe.ch/staff/Schwarz
twitter.com/nes1983
Tel: +41 076 235 8683

--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 

Re: [Proto-Scripty] Re: document.observe and Sorter in scrolling li sts

2009-12-08 Thread Niko Schwarz
Alright, if it makes you any happier:

!DOCTYPE html
html lang=en
head
script src=http://www.google.com/jsapi;/script
script
 google.load(prototype, 1.6.1.0);
 google.load(scriptaculous, 1.8.3);

 document.observe(dom:loaded, function() {
   Sortable.create('fruit', {
  scroll: container
  });});

/script

titleTest/title
/headbody
div id=container style=overflow: scroll; width: 200px; height: 100px;
ul id=fruit
  liApple
  liBanana
  liPeach
  liStrawberry
  liCherry
  liPear
  liOrange
  liMango
/ul
/div
/body


So, what should I do?
On Tue, Dec 8, 2009 at 9:36 AM, Niko Schwarz
niko.schw...@googlemail.com wrote:
 That is, the tags are, the elements are not. A title can only appear
 in a head, that's why my document clearly has a head element – I don't
 need to spell out the tag for that. And the head ends, and body
 begins, with the first element that can only be found in body.

 For example, validate this: http://snipt.net/nes1983/minimal-valid-html5/

 In a HTML5 validator: http://html5.validator.nu/

 It's valid. It saves space, no amount of confusion is caused by
 dropping these tags, so I would argue that it's good practice, when
 handcoding html, to drop the irrelevant things.

 I just validated the snipped I'd sent, and I learned that I forgot
 closing a div at the end of the snippet, otherwise it is valid. Here's
 the snippet with the closing div, passes through an html5 validator:

 !DOCTYPE html
 html lang=en
 script src=http://www.google.com/jsapi;/script
 script
  google.load(prototype, 1.6.1.0);
  google.load(scriptaculous, 1.8.3);

  document.observe(dom:loaded, function() {
    Sortable.create('fruit', {
   scroll: container
   });});

 /script

 titleTest/title
 div id=container style=overflow: scroll; width: 200px; height: 100px;
 ul id=fruit
   liApple
   liBanana
   liPeach
   liStrawberry
   liCherry
   liPear
   liOrange
   liMango
 /ul
 /div



 Cheers,

 Niko

 On Tue, Dec 8, 2009 at 9:27 AM, Niko Schwarz
 niko.schw...@googlemail.com wrote:
 I don't think so. head and body are both optional:

 http://dev.w3.org/html5/spec/Overview.html#optional-tags

 On Tue, Dec 8, 2009 at 1:24 AM, Rick Waldron waldron.r...@gmail.com wrote:
 Missing:

 head
 body

 If found, please return.

 -- Sent from my Palm Prē
 
 Niko Schwarz wrote:

 I don't know why, but somehow this snippet executes document.observe
 fine. I just open another script tag and suddenly the world is good.

 But the issue with the scrolling drag and drop remains. This code
 snippet should be executable in a browser as is, from a file (I can
 attach it as a file if that's easier, or host it on a website):

 !DOCTYPE html
 html lang=en
 script src=http://www.google.com/jsapi;/script
 script
 google.load(prototype, 1.6.1.0);
 google.load(scriptaculous, 1.8.3);
 /script
 script
 document.observe('dom:loaded',function() {
 Sortable.create('fruit', {
 scroll: container
 });
 });

 /script

 titleTest/title
 div id=container style=overflow: scroll; width: 200px; height: 100px;
 ul id=fruit
 liApple
 liBanana
 liPeach
 liStrawberry
 liCherry
 liPear
 liOrange
 liMango
 /ul

 Cheers,

 Niko

 On Mon, Dec 7, 2009 at 7:15 PM, Niko Schwarz
 niko.schw...@googlemail.com wrote:
 Hi, I have this tiny script, and it fails in two ways. First, the
 document observe thing fails really strangely, saying:

 TypeError: Result of expression 'document.observe' [undefined] is not
 a function.

 The second error, after I create the sorter on the command line: You
 cannot drag and drop the lower elements of the list.

 Here's the script:

 !DOCTYPE html
 html lang=en
 script src=http://www.google.com/jsapi;/script
 script
   google.load(prototype, 1.6.1.0);
   google.load(scriptaculous, 1.8.3);

   document.observe(dom:loaded, function() {
     Sortable.create('fruit', {
    scroll: container
    });});

 /script

 titleTest/title
 div id=container style=overflow: scroll; width: 200px; height:
 100px;
 ul id=fruit
    liApple
    liBanana
    liPeach
    liStrawberry
    liCherry
    liPear
    liOrange
    liMango
 /ul


 So, what is your take?


 Cheers,

 Niko


 --
 http://scg.unibe.ch/staff/Schwarz
 twitter.com/nes1983
 Tel: +41 076 235 8683




 --
 http://scg.unibe.ch/staff/Schwarz
 twitter.com/nes1983
 Tel: +41 076 235 8683

 --

 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/prototype-scriptaculous?hl=en.


 --

 You received this message because you are subscribed to the Google Groups
 Prototype  script.aculo.us group.
 To post to this group, send email to
 prototype-scriptacul...@googlegroups.com.
 To unsubscribe from this group, send email to
 prototype-scriptaculous+unsubscr...@googlegroups.com.
 

Re: [Proto-Scripty] Re: document.observe and Sorter in scrolling li sts

2009-12-07 Thread Rick Waldron
Missing:

lt;head
lt;body

If found, please return.

-- Sent from my Palm Prē
Niko Schwarz wrote:

I don't know why, but somehow this snippet executes document.observe

fine. I just open another script tag and suddenly the world is good.



But the issue with the scrolling drag and drop remains. This code

snippet should be executable in a browser as is, from a file (I can

attach it as a file if that's easier, or host it on a website):



lt;!DOCTYPE html

lt;html lang=en

lt;script src=http://www.google.com/jsapi;lt;/script

lt;script

   google.load(prototype, 1.6.1.0);

   google.load(scriptaculous, 1.8.3);

lt;/script

lt;script

   document.observe('dom:loaded',function() {

Sortable.create('fruit', {

scroll: container

});

});



lt;/script



lt;titleTestlt;/title

lt;div id=container style=overflow: scroll; width: 200px; height: 100px;

lt;ul id=fruit

lt;liApple

lt;liBanana

lt;liPeach

lt;liStrawberry

lt;liCherry

lt;liPear

lt;liOrange

lt;liMango

lt;/ul



Cheers,



Niko



On Mon, Dec 7, 2009 at 7:15 PM, Niko Schwarz

lt;niko.schw...@googlemail.com wrote:

 Hi, I have this tiny script, and it fails in two ways. First, the

 document observe thing fails really strangely, saying:



 TypeError: Result of expression 'document.observe' [undefined] is not

 a function.



 The second error, after I create the sorter on the command line: You

 cannot drag and drop the lower elements of the list.



 Here's the script:



 lt;!DOCTYPE html

 lt;html lang=en

 lt;script src=http://www.google.com/jsapi;lt;/script

 lt;script

   google.load(prototype, 1.6.1.0);

   google.load(scriptaculous, 1.8.3);



   document.observe(dom:loaded, function() {

     Sortable.create('fruit', {

    scroll: container

    });});



 lt;/script



 lt;titleTestlt;/title

 lt;div id=container style=overflow: scroll; width: 200px; height: 100px;

 lt;ul id=fruit

    lt;liApple

    lt;liBanana

    lt;liPeach

    lt;liStrawberry

    lt;liCherry

    lt;liPear

    lt;liOrange

    lt;liMango

 lt;/ul





 So, what is your take?





 Cheers,



 Niko





 --

 http://scg.unibe.ch/staff/Schwarz

 twitter.com/nes1983

 Tel: +41 076 235 8683









-- 

http://scg.unibe.ch/staff/Schwarz

twitter.com/nes1983

Tel: +41 076 235 8683



--



You received this message because you are subscribed to the Google Groups 
Prototype amp; script.aculo.us group.

To post to this group, send email to prototype-scriptacul...@googlegroups.com.

To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.

For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.






--

You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.