[Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to work correctly

2009-01-13 Thread Alex Mcauley

if its any help the same thing happens in google chrome !!
- Original Message - 
From: Cyrus arianglan...@googlemail.com
To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
Sent: Monday, January 12, 2009 5:27 PM
Subject: [Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to 
work correctly



Prototype 1.6.0.3
Opera 9.63

On 12 Jan., 17:30, kangax kan...@gmail.com wrote:
 On Jan 12, 10:37 am, Cyrus arianglan...@googlemail.com wrote:

  Hi there,

  I have found a weird behaviour in the opera browser. I am not sure if
  this is really a bug or an intended behaviour.

 [...]

 Which versions of Prototype.js and Opera?

 --
 kangax



--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to work correctly

2009-01-13 Thread Richard Quadling

2009/1/13 Alex Mcauley webmas...@thecarmarketplace.com:

 if its any help the same thing happens in google chrome !!
 - Original Message -
 From: Cyrus arianglan...@googlemail.com
 To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
 Sent: Monday, January 12, 2009 5:27 PM
 Subject: [Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to
 work correctly



 Prototype 1.6.0.3
 Opera 9.63

 On 12 Jan., 17:30, kangax kan...@gmail.com wrote:
 On Jan 12, 10:37 am, Cyrus arianglan...@googlemail.com wrote:

  Hi there,

  I have found a weird behaviour in the opera browser. I am not sure if
  this is really a bug or an intended behaviour.

 [...]

 Which versions of Prototype.js and Opera?

 --
 kangax



 


Adding ...

test.each(function(el){el.style.backgroundColor='green';});

to the script (just after the var test line) and I see 2 green divs.

Using Windows XP Pro SP3 with Chrome V1.0.154.43, Firefox V3.0.5 and
IE V7.0.5730.13.

NFF/Picnic?
-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731
Standing on the shoulders of some very clever giants!

--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to work correctly

2009-01-13 Thread Cyrus

Not in Opera 9.63 I am afraid ...

On 13 Jan., 10:41, Richard Quadling rquadl...@googlemail.com
wrote:
 2009/1/13 Alex Mcauley webmas...@thecarmarketplace.com:





  if its any help the same thing happens in google chrome !!
  - Original Message -
  From: Cyrus arianglan...@googlemail.com
  To: Prototype  script.aculo.us prototype-scriptaculous@googlegroups.com
  Sent: Monday, January 12, 2009 5:27 PM
  Subject: [Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to
  work correctly

  Prototype 1.6.0.3
  Opera 9.63

  On 12 Jan., 17:30, kangax kan...@gmail.com wrote:
  On Jan 12, 10:37 am, Cyrus arianglan...@googlemail.com wrote:

   Hi there,

   I have found a weird behaviour in the opera browser. I am not sure if
   this is really a bug or an intended behaviour.

  [...]

  Which versions of Prototype.js and Opera?

  --
  kangax

 Adding ...

 test.each(function(el){el.style.backgroundColor='green';});

 to the script (just after the var test line) and I see 2 green divs.

 Using Windows XP Pro SP3 with Chrome V1.0.154.43, Firefox V3.0.5 and
 IE V7.0.5730.13.

 NFF/Picnic?
 --
 -
 Richard Quadling
 Zend Certified Engineer :http://zend.com/zce.php?c=ZEND002498r=213474731
 Standing on the shoulders of some very clever giants!
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to work correctly

2009-01-13 Thread Cyrus

I just used .class for this example. In my case I have a much more
complex HTML structure so it took me a while to actually find the bug.

 If you're getting back one element, not two, it's a bug.  The question
 is, in what -- Prototype's selection code, Opera, or both?  I lean
 toward Opera bug.

I guess the same, but maybe Prototype need an internal Opera
workarround here?

What would you suggest? File a bug report at Opera, Prototype or both?


On 13 Jan., 11:35, T.J. Crowder t...@crowdersoftware.com wrote:
 Hi,

  I am not sure if
  this is really a bug or an intended behaviour.

 If you're getting back one element, not two, it's a bug.  The question
 is, in what -- Prototype's selection code, Opera, or both?  I lean
 toward Opera bug.

 Interestingly, this _doesn't_ fail on Opera 9.10 for Windows:  It
 returns two elements as expected.

 Have you tried it using a different classname than class for the
 inner element?  (I tend to think you just used that in your example,
 having seen this in something else, but just in case...)
 --
 T.J. Crowder
 tj / crowder software / com
 Independent Software Engineer, consulting services available

 On Jan 12, 3:37 pm, Cyrus arianglan...@googlemail.com wrote:

  Hi there,

  I have found a weird behaviour in the opera browser. I am not sure if
  this is really a bug or an intended behaviour.

  The following example shows that the $$ function only returns one
  element instead of two. This is only because the second element is in
  a different dom level. All other browser return two elements with this
  example.

  ?xml version=1.0 encoding=UTF-8?
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/
  TR/xhtml11/DTD/xhtml11.dtd
  html xmlns=http://www.w3.org/1999/xhtml; dir=ltr xml:lang=de

  head

          meta http-equiv=Content-Type content=text/html; charset=utf-8 
  /

          titleTest/title

          script src=jsLib/prototype.js type=text/javascript/script

          script type=text/javascript
                  //![CDATA[
                  function init() {
                          // init more information handling
                          var test = $$('.wrapper .class');
                  }

                  // when the dom is fully loaded, execute these scripts
                  document.observe(dom:loaded, init);
                  //]]
          /script

  /head

  body

          div class=wrapper
                  a href=# class=classtest/a
          /div
          div
                  div class=wrapper
                          a href=# class=classtest/a
                  /div
          /div
  /body
  /html
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] using Element.select with capital letters in Safari.. bug?

2009-01-13 Thread Timo

I have a div with the id loginWindow inside that i have another div
with the class .title
I used Element.select($('loginWindow'), '.title') to get that node.
Works very good in all other browsers but not Safari.

After some investagation i found the code that is failing
results = $A(root.querySelectorAll(e)).map(Element.extend);
in the Selector.findElements function.

However if i have no captial letters and set the id to loginwindow
it works in Safari.

Is this a bug in prototype or is it a Safari issue?

--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: How would you calculate the avg() value of a row?

2009-01-13 Thread T.J. Crowder

Hi Richard,

I don't think there's anything built into Prototype or script.aculo.us
that does the whole job, but certainly Prototype makes the job a lot
easier with its various DOM utilities and language helpers.  It's
worth giving the API a read (1-2 hours max).  That said, if you're not
much of a JavaScript guy, it may be worth outsourcing your client-side
stuff.

But here are a few building blocks:

Prototype's $$() function[1] finds elements based on CSS selectors, so
for instance, if all of the rows you want calculated are given the
class calc, this finds them and gives you an (extended) array of
them:

var rows = $$('tr.calc');

You can also find descendent elements within a specific element using
Element#select[2].  So given a row element, this finds all of the
relevant cells and gives you an extended array of them:

var cells = row.select('td.relevant');

If you know that the cells you want to average contain *only* the text
of the number, you can access that text easily via the non-standard
(but widely-implemented) innerHTML property and turn that text into a
number with the JavaScript parseInt function:

value = parseInt(cell.innerHTML);

parseInt will return NaN if the text is not a number; you can test for
that with the JavaScript isNaN function.  Obviously if the cell is
going to have more complicated contents, you'll have to handle those.

In terms of filling in the cell where you want to display the average,
you can assign an HTML string to innerHTML directly, or use
Prototype's Element#update[3] function to do it.

Bringing it all together, suppose you give the cells you want averaged
the CSS class relevant and the cell you want displaying the average
the class avg, all within rows with the class calc.  This off-the-
cuff and largely-untested function will handle a given row:
* * * *
function calcRowAverage(row)
{
var avgcell;
var cells;
var total;
var count;
var val;

// Make sure this row has a place to put the average
avgcell = row.select('td.avg')[0];
if (avgcell)
{
// It does, get the relevant cells
cells = row.select('td.relevant');

// Get the average, allowing for empty/non-numeric cells
total = 0;
count = 0;
cells.each(function(cell){
val = parseInt(cell.innerHTML);
if (!isNaN(val))
{
total += val;
++count;
}
});

// Show the result
if (count  0)
{
avgcell.update('' + (total / count));
}
else
{
avgcell.update('');
}
}
}
* * * *

In response to whatever your we need to calculate trigger/event is,
this fragment would recalculate all rows:

$$('tr.calc').each(calcRowAverage);

...using $$() and the Enumerable#each function[4] that Prototype mixes
into arrays.  If your trigger/event is loading the page, you can
either use window.onload or better yet, the nifty the DOM is loaded
and ready event dom:loaded[5] that Prototype suppplies:

document.observe('dom:loaded', function() {
$$('tr.calc').each(calcRowAverage);
});

For help with various JavaScript and DOM things, I find the w3schools
website[6] offers decent beginner-level information.  For the real
scoop, though, there's nothing like the specs.[7][8][9]

[1] http://prototypejs.org/api/utility/dollar-dollar
[2] http://prototypejs.org/api/element/select
[3] http://prototypejs.org/api/element/update
[4] http://prototypejs.org/api/enumerable/each
[5] http://prototypejs.org/api/document/observe
[6] http://www.w3schools.com
[7] http://www.ecma-international.org/publications/standards/Ecma-262.htm
[8] http://www.w3.org/DOM/DOMTR
[9] http://www.w3.org/Style/CSS/

HTH,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Jan 13, 10:21 am, RNHurt rnh...@gmail.com wrote:
 We are building a online gradebook system for teachers and one of the
 most important aspects is entering grades into a spreadsheet-like
 structure.  The teachers need to see a students running average and my
 first thought was to build an HTML table and have Javascript do some
 calculations on the fly.  These results do not have to be written back
 to the database, just displayed in the table.

 Since we are using Ruby on Rails and it is using Prototype 
 script.aculo.us I thought you guys might be able to help us.  I don't
 think this is really too complex but I'm not much of a Javascript guy
 and would like to know the best way of doing something like this.
 If there is something already built-in to these two frameworks, even
 better!

 Thanx!
   Richard
--~--~-~--~~~---~--~~
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-scriptaculous@googlegroups.com
To unsubscribe from this group, send email 

[Proto-Scripty] Bug with afterFinish: when used during a mouse event?

2009-01-13 Thread Marcos


Hello, considering that when I use the afterFinish call on the
scriptaculous effects that are used on initial page load it works fine
and the function is called indeed after the effect has finished
rendering it's final loop.

When i use the same afterFinish attribute on an effect that is called
after a mouseover event, the function is called immediately (on the
first frame). Is this a known bug? or am I missing something?


mouseover: function(e) {
var element = e.element();
if (this.ready  (element.rel=='in' || element.rel==undefined))
{
new Effect.Highlight(element, { startcolor: '#11', endcolor:
'#BB', restorecolor: '#BB', duration: 0.5,queue: { position:
'end', scope: element.id + '_hl', limit: 2}});
new Effect.Move(element,{ x: -30, y: 0, mode: 'relative',
transition: Effect.Transitions.spring, duration: 0.6, queue:
{ position: 'end', scope: element.id + '_mv', limit: 2}, afterFinish:
this.mouseover_finished(element)});
}
},

--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to work correctly

2009-01-13 Thread kangax

On Jan 13, 6:26 am, Cyrus arianglan...@googlemail.com wrote:

[...]

 What would you suggest? File a bug report at Opera, Prototype or both?

I can confirm this with 9.61 on Mac OSX. Here's a minimal failing test
case:

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01//EN
   http://www.w3.org/TR/html4/strict.dtd;
html
  head
title/title
script src=http://ajax.googleapis.com/ajax/libs/prototype/
1.6.0.3/prototype.js type=text/javascript/script
  /head
  body
div class=wrapper
  a href=# class=classtest/a
/div
div
  div class=wrapper
a href=# class=classtest/a
  /div
/div
script type=text/javascript
  document.write($$('.wrapper .class').length);
/script
  /body
/html

Should write 2 but writes 1.

This looks like an Opera bug. Moreover, I think we already have a
similar ticket filed (which was essentially due to a bug in Opera's
XPath engine bug and the way it handles descendant selectors). For
example, switching to child selector ('.wrapper  .class') returns
proper result - 2.

[...]

--
kangax
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to work correctly

2009-01-13 Thread T.J. Crowder

Hi Juriy,

That inline script could muddy the water in terms of DOM availability,
etc.  Perhaps a minor mod:

!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01//EN
   http://www.w3.org/TR/html4/strict.dtd;
html
  head
title/title
script src=http://ajax.googleapis.com/ajax/libs/prototype/
1.6.0.3/prototype.js type=text/javascript/script
script type=text/javascript
document.observe('dom:loaded', function() {
$('matchcount').update('Matches: ' + $$
('.wrapper .inner').length);
});
/script
  /head
  body
div class=wrapper
  a href=# class=innertest/a
/div
div
  div class=wrapper
a href=# class=innertest/a
  /div
/div
div id='matchcount'/div
  /body
/html

I also changed class to inner, again for clear water.

FWIW,

-- T.J.

On Jan 13, 1:20 pm, kangax kan...@gmail.com wrote:
 On Jan 13, 6:26 am, Cyrus arianglan...@googlemail.com wrote:

 [...]

  What would you suggest? File a bug report at Opera, Prototype or both?

 I can confirm this with 9.61 on Mac OSX. Here's a minimal failing test
 case:

 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01//EN
    http://www.w3.org/TR/html4/strict.dtd;
 html
   head
     title/title
     script src=http://ajax.googleapis.com/ajax/libs/prototype/
 1.6.0.3/prototype.js type=text/javascript/script
   /head
   body
     div class=wrapper
       a href=# class=classtest/a
     /div
     div
       div class=wrapper
         a href=# class=classtest/a
       /div
     /div
     script type=text/javascript
       document.write($$('.wrapper .class').length);
     /script
   /body
 /html

 Should write 2 but writes 1.

 This looks like an Opera bug. Moreover, I think we already have a
 similar ticket filed (which was essentially due to a bug in Opera's
 XPath engine bug and the way it handles descendant selectors). For
 example, switching to child selector ('.wrapper  .class') returns
 proper result - 2.

 [...]

 --
 kangax
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to work correctly

2009-01-13 Thread Cyrus

Ok, thanks.

Unfortunately I cannot use the child selector in my case.

I'll write a bug report.

On 13 Jan., 14:20, kangax kan...@gmail.com wrote:
 On Jan 13, 6:26 am, Cyrus arianglan...@googlemail.com wrote:

 [...]

  What would you suggest? File a bug report at Opera, Prototype or both?

 I can confirm this with 9.61 on Mac OSX. Here's a minimal failing test
 case:

 !DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01//EN
    http://www.w3.org/TR/html4/strict.dtd;
 html
   head
     title/title
     script src=http://ajax.googleapis.com/ajax/libs/prototype/
 1.6.0.3/prototype.js type=text/javascript/script
   /head
   body
     div class=wrapper
       a href=# class=classtest/a
     /div
     div
       div class=wrapper
         a href=# class=classtest/a
       /div
     /div
     script type=text/javascript
       document.write($$('.wrapper .class').length);
     /script
   /body
 /html

 Should write 2 but writes 1.

 This looks like an Opera bug. Moreover, I think we already have a
 similar ticket filed (which was essentially due to a bug in Opera's
 XPath engine bug and the way it handles descendant selectors). For
 example, switching to child selector ('.wrapper  .class') returns
 proper result - 2.

 [...]

 --
 kangax
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to work correctly

2009-01-13 Thread kangax

On Jan 13, 8:30 am, T.J. Crowder t...@crowdersoftware.com wrote:
 Hi Juriy,

 That inline script could muddy the water in terms of DOM availability,
 etc.  Perhaps a minor mod:

I usually try to eliminate as much of irrelevant prototypeism as
possible when creating a testcase : ) Why use dom:loaded (which is
also known to be unreliable in IE in its current implementation) when
we can simply run script at the time when body is definitely loaded
and parsed.

[...]

--
kangax
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Any reason this BlindRight effect should not work in FireFox?

2009-01-13 Thread Lochinvar

Effect.BlindRight = function(element, content) {
  element = $(element);
  var content = content;
  var elementDimensions = element.getDimensions();
  new Effect.Scale(element, 100, Object.extend({
scaleContent: false,
scaleY: false,
scaleFrom: 0,
scaleMode: {originalHeight: elementDimensions.height,
originalWidth: elementDimensions.width},
restoreAfterFinish: true,
afterSetup: function(effect) {
  effect.element.makeClipping().setStyle({
width: '0px',
height: effect.dims[0] + 'px'
  }).show();
},
afterFinishInternal: function(effect) {
   effect.element.undoClipping();
}
  }, arguments[1] || { }));

element.style.visibility = 'visible';
element.innerHTML = brbrnbsp;nbsp;nbsp;nbsp;nbsp;nbsp;img
src='./images/loading.gif';
  try {
req = window.XMLHttpRequest ? new XMLHttpRequest(): new
ActiveXObject(Microsoft.XMLHTTP);
  }
  catch (e) { alert(No AJAX Support); }
  req.onreadystatechange = function () {
//  if ((req.readyState == 4)  (req.status == 200)) {
 if(element) element.innerHTML = req.responseText;
//   if(callback_id) GETrequest_callbackHandler(callback_id);
//}
  }
  req.open( 'GET',  content + '.php' );
  req.send( null );
};

--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to work correctly

2009-01-13 Thread T.J. Crowder

 I usually try to eliminate as much of irrelevant prototypeism as
 possible when creating a testcase : )

Fair 'nuff, but I'd still use something other than inline to allow for
browsers being difficult about the closing body tag and DOM rendering
time.  Probably me being paranoid.  Perhaps (shock and horror) DOM0
window.onload stuff, image loading not being an issue:

script type='text/javascript'
window.onload = function() {
alert('Found ' + $$('.wrapper .inner').length);
});
/script

 at the time when body is definitely loaded
 and parsed.

Is it, definitely?  Within the tag?  (Serious question, you know more
about this stuff than I do.)

-- T.J. ;-)


On Jan 13, 2:17 pm, kangax kan...@gmail.com wrote:
 On Jan 13, 8:30 am, T.J. Crowder t...@crowdersoftware.com wrote:

  Hi Juriy,

  That inline script could muddy the water in terms of DOM availability,
  etc.  Perhaps a minor mod:

 I usually try to eliminate as much of irrelevant prototypeism as
 possible when creating a testcase : ) Why use dom:loaded (which is
 also known to be unreliable in IE in its current implementation) when
 we can simply run script at the time when body is definitely loaded
 and parsed.

 [...]

 --
 kangax
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to work correctly

2009-01-13 Thread Jerod Venema
Hey all, when you're replying to these threads, can you make sure you keep
it on-list? I like to keep up with various solutions to all these problems,
and seeing half the solution (or no solution at all) is really frustrating.

(@Kangax, I know I've seen a few replies to messages you've sent off-list,
and since I know you've got good replies, I'd love it if they'd stay on the
list. :-D)

Thanks!

On Tue, Jan 13, 2009 at 12:58 PM, T.J. Crowder t...@crowdersoftware.comwrote:


  I usually try to eliminate as much of irrelevant prototypeism as
  possible when creating a testcase : )

 Fair 'nuff, but I'd still use something other than inline to allow for
 browsers being difficult about the closing body tag and DOM rendering
 time.  Probably me being paranoid.  Perhaps (shock and horror) DOM0
 window.onload stuff, image loading not being an issue:

 script type='text/javascript'
 window.onload = function() {
alert('Found ' + $$('.wrapper .inner').length);
 });
 /script

  at the time when body is definitely loaded
  and parsed.

 Is it, definitely?  Within the tag?  (Serious question, you know more
 about this stuff than I do.)

 -- T.J. ;-)


 On Jan 13, 2:17 pm, kangax kan...@gmail.com wrote:
  On Jan 13, 8:30 am, T.J. Crowder t...@crowdersoftware.com wrote:
 
   Hi Juriy,
 
   That inline script could muddy the water in terms of DOM availability,
   etc.  Perhaps a minor mod:
 
  I usually try to eliminate as much of irrelevant prototypeism as
  possible when creating a testcase : ) Why use dom:loaded (which is
  also known to be unreliable in IE in its current implementation) when
  we can simply run script at the time when body is definitely loaded
  and parsed.
 
  [...]
 
  --
  kangax
 



-- 
Jerod Venema
Frozen Mountain Software
http://www.frozenmountain.com/
919-368-5105

--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] effect.toggle produces inconsistent spacing between lines of text. ??

2009-01-13 Thread Frank Ruscica

hello all,

the problem can be seen at http://www.landofopportunitv.com/, by
contrasting the amount of space below the (separate) lines containing
toggle-able footnotes [2]  [4], w/ the space below the lines
containing all the other footnotes.

via 'view source', you can see that the code for each toggle is
identical (other than the div id).

any fixes come to mind?

thx much for any insight.

frank

--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Inheritance question

2009-01-13 Thread Dan

You are confusing constructors with class definition.Class.create() is
for defining a new Class which will support inheritance. To
construct an instance of a class you defined with var MyClass =
Class.create(baseClass, { ... }) you construct it like you would any
other object:

var myClassInstance = new MyClass();

So, this should work:

// extend
SortableLabelList = Class.create(Sortable, {
// redefine onHover
onHover: function($super, element, dropon, overlap) {
$super();
console.log(element);
console.log(dropon);
console.log(overlap);
}

});

// create list
var mySortableLabelList = new SortableLabelList(...);

For more info, see the example in the documentation:

http://prototypejs.org/api/class/create

Dan





On Jan 13, 6:31 am, Cyrus arianglan...@googlemail.com wrote:
 Ok, thanks.

 Let me describe my actual problem:

 I have a list with labels and checkboxes:

 ul id=list
 lilabelinput type=checkbox / My first checkbox/label/li
 lilabelinput type=checkbox / My second checkbox/label/li
 ...
 /ul

 I wanted to have that list sortable. Very easy task with Sortable:

 Sortable.create(list);

 Works fine except one issue:

 Safari and Firefox interpret the drag and drop as a click on the
 label. Clicking on the label changes the status of the checkbox. There
 must be a way to prevent this.

 Do you have any ideas how to do this.

 I used the Sortable callback onChange to save the checkbox status
 before the drop. The other callback onUpdate is fired before the click
 on the label takes effect. I would like to add another change listener
 to the checkbox that only takes effect when onUpdate was fired.

 On 13 Jan., 14:44, T.J. Crowder t...@crowdersoftware.com wrote:

  Hi Cyrus,

  I don't know much about script.aculo.us, but looking at it
  (dragdrop.js), Sortable isn't a class (in the loose way we use that
  word in this classless prototypical language JavaScript), it's just an
  object with a bunch of functions assigned as properties.  So you won't
  be able to extend it in this way.  Perhaps someone who's done more
  with script.aculo.us can point you to a convenient way to achieve the
  result you're looking for.

  FWIW,
  --
  T.J. Crowder
  tj / crowder software / com
  Independent Software Engineer, consulting services available

  On Jan 13, 1:27 pm, Cyrus arianglan...@googlemail.com wrote:

   Hi,

   I want to extend the Sortable class from the scriptaculous library.
   Where is my mistake? It's telling me SortableLabelList.create doesn't
   exist - I assumed it is inherited from Sortable.

   // extend
   SortableLabelList = Class.create(Sortable, {
           // redefine onHover
           onHover: function($super, element, dropon, overlap) {
                   $super();
                   console.log(element);
                   console.log(dropon);
                   console.log(overlap);
           }

   });

   // create list
   SortableLabelList.create(...);

--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: OK in IE - remove prototype and OK in Firefox!?

2009-01-13 Thread Dan

Elements can not have numeric ID's or id's which start with numbers.

change your ID's to this format of:

div id=div1

Then use:
document.getElementById(div + (divCount+1)).className ='hiddenDiv';

and so on...


On Jan 13, 8:56 am, geoffcox g...@freeuk.com wrote:
 Hello

 the code below works fine in IE but will only work in latest Firefox
 if I remove the link to the prototype js file. Form 2 radio buttons do
 not appear after selecting a button for Form 1.

 Of course the ajax updater does not work then!

 Any ideas please!

 Geoff

 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;
 html
 head
 titleWM/title

 script src=assets/javascripts/prototype-1.6.0.3.js type=text/
 javascript
 /script

 style
 .visibleDiv {
 display : block}

 .hiddenDiv {
 display : none}

 /style

 script type=text/javascript

 var results = [];
 var divCount = 0;

 function sendResults() {

 var params = ({
 section1: results[0],
 section2: results[1],
 section3: results[2]

 });

     new Ajax.Updater(
         'updateDiv',
         'wm-send.php',
         {
             asynchronous:true,
             method:'post',
             parameters: params
         }
     );

 }

 function getValue(form) {

 var radioName = form.elements[0].name;
 var typeValue = form[radioName];

 if(typeValue) {
         for(var i=0, n=typeValue.length; ni; i++) {
                 if(typeValue[i].checked) {
                 results[divCount] = typeValue[i].value;
                                                          }
                         }

 }

 if (divCount  2) {
 document.getElementById(divCount+1).className ='hiddenDiv';
 document.getElementById(divCount+2).className ='visibleDiv';
 divCount++;} else {

 document.getElementById(divCount+1).className ='hiddenDiv';
 sendResults();

 }
 }

 /script
 /head

 body

 div id=1 class=visibleDiv
 form1
 form name=myform1 action=#
 input type=radio name=picNum1 value=1
 input type=radio name=picNum1 value=2
 input type=radio name=picNum1 value=3
 input type=button name=button value=Send
 onClick=getValue(this.form);
 /form
 /div

 div id=2 class=hiddenDiv
 form2
 form name=myform2 action=#
 input type=radio name=picNum2 value=1
 input type=radio name=picNum2 value=2
 input type=radio name=picNum2 value=3
 input type=button name=button value=Send
 onClick=getValue(this.form);
 /form
 /div

 div id=3 class=hiddenDiv
 form3
 form name=myform3 action=#
 input type=radio name=picNum3 value=1
 input type=radio name=picNum3 value=2
 input type=radio name=picNum3 value=3
 input type=button name=button value=Send
 onClick=getValue(this.form);
 /form
 /div

 div id=updateDiv/div

 /body
 /html

--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Help With Prototype.Comet

2009-01-13 Thread Chris17

First  I don't know a lot of english

I've look this web 
http://www.ribosomatic.com/articulos/como-implementar-comet-con-php-y-prototype/

I test the example ,Works excellent
Just with this code I can build a chat but i have a big problem


I need a chat where you choose someone to talk,
so comet must to reload just pages who people is speaking in that
conversation
no all the pages in the domain

Any help please???

--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Is this a bug? an element is enclosed unexpectedly by an inserted method.

2009-01-13 Thread Hamamoto Noriaki
Hi Kangax,

It sounds like weird, but I could understand how it works.
Thanks for telling me that.

Nori

2009/1/13 kangax kan...@gmail.com


 On Jan 12, 11:04 pm, Hamamoto Noriaki norisu...@gmail.com wrote:
  Hey Kangax,
 
  Thank you for the reply.
  Do you think the reason of the problem I met is because of using div/
  instead of div/div ?
  is Using /div prohibitted? Do you know why it happns?

 I'm pretty sure some browsers (at least FF) parses div / as an
 opening one in this case. You can see how html parser works in a
 simple example:

 var el = document.createElement('div');
 el.innerHTML = 'div id=foo //div id=bar /';
 el.innerHTML; // div id=foo/div
 el.childNodes.length; // 1

 When using broken markup, you're relying on a closed-source
 mechanism of browser parsing, or rather the way browser parser
 *corrects* invalid markup. Just use standard constructs and chances
 are you won't run into such annoying anomalies.

 [...]

 --
 kangax
 


--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Opera Mobile support

2009-01-13 Thread kangax

On Jan 13, 5:48 pm, Laurent Dinclaux laurent.dincl...@gmail.com
wrote:

[...]

 I will also send the rendering result of  js-cecker page when I find
 where opera saved it on my handset...

Sounds great. Unfortuantely, I wasn't able to simulate Opera Mobile on
desktop so your results would help a lot.

[...]

--
kangax
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: How would you calculate the avg() value of a row?

2009-01-13 Thread RNHurt

T.J.,

Thank you for the extraordinary help - your script worked right off
the bat!  The only thing I'm struggling with right now is the fact
that the cells I want to calculate are not just numbers but form
elements.  So, cell.innerHTML is something like input id=grade1
value=20 instead of 20.  I've tried multiple things to coerce the
value out of the cell but so far have not had much luck.  Any hints?

Thanx!
  Richard
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: OK in IE - remove prototype and OK in Firefox!?

2009-01-13 Thread geoffcox

Dan,

Thanks for your reply. I have changed as suggested - see below - but
still not working unless I remove the prototype link so there must be
more!

Any other errors that you can see?

Cheers,

Geoff

!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
http://www.w3.org/TR/html4/loose.dtd;
html
head
titleWM/title

script src=assets/javascripts/prototype-1.6.0.3.js type=text/
javascript
/script

style
.visibleDiv {
display : block
}
.hiddenDiv {
display : none
}
/style

script type=text/javascript

var results = [];
var divCount = 0;

function sendResults() {

var params = ({
section1: results[0],
section2: results[1],
section3: results[2]

});

new Ajax.Updater(
'updateDiv',
'wm-send.php',
{
asynchronous:true,
method:'post',
parameters: params
}
);

}

function getValue(form) {


var radioName = form.elements[0].name;
var typeValue = form[radioName];

if(typeValue) {
for(var i=0, n=typeValue.length; ni; i++) {
if(typeValue[i].checked) {
results[divCount] = typeValue[i].value;
 }
}
}

if (divCount  2) {
document.getElementById(div + (divCount+1)).className ='hiddenDiv';
document.getElementById(div + (divCount+2)).className ='visibleDiv';
divCount++;
} else {
document.getElementById(div + (divCount+1)).className ='hiddenDiv';
sendResults();
}

}

/script
/head

body

div id=div1 class=visibleDiv
form1
form name=myform1 action=#
input type=radio name=picNum1 value=1
input type=radio name=picNum1 value=2
input type=radio name=picNum1 value=3
input type=button name=button value=Send
onClick=getValue(this.form);
/form
/div

div id=div2 class=hiddenDiv
form2
form name=myform2 action=#
input type=radio name=picNum2 value=1
input type=radio name=picNum2 value=2
input type=radio name=picNum2 value=3
input type=button name=button value=Send
onClick=getValue(this.form);
/form
/div

div id=div3 class=hiddenDiv
form3
form name=myform3 action=#
input type=radio name=picNum3 value=1
input type=radio name=picNum3 value=2
input type=radio name=picNum3 value=3
input type=button name=button value=Send
onClick=getValue(this.form);
/form
/div


div id=updateDiv/div

/body
/html
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: How would you calculate the avg() value of a row?

2009-01-13 Thread Walter Lee Davis

That's even easier! $F('grade1') would get you the value of  
input#grade1.

Walter

On Jan 13, 2009, at 8:00 PM, RNHurt wrote:

 the cells I want to calculate are not just numbers but form
 elements.  So, cell.innerHTML is something like input id=grade1
 value=20 instead of 20.  I've tried multiple things to coerce the
 value out of the cell but so far have not had much luck.

--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Inheritance question

2009-01-13 Thread Jerod Venema
If you're trying to avoid the default behaviour for the label (which is to
check/uncheck the appropriate form element), you may want to just use
prototypes stop [1] function. I've never done this, but something like the
following ought to work (I think):

Event.observe('mylabel', 'click', function(evt){
  Event.stop(evt);
});

You'll probably want a $$('label') call instead of 'mylabel', but you get
the idea.

[1] http://www.prototypejs.org/api/event/stop

On Tue, Jan 13, 2009 at 9:31 AM, Cyrus arianglan...@googlemail.com wrote:


 Ok, thanks.

 Let me describe my actual problem:

 I have a list with labels and checkboxes:

 ul id=list
 lilabelinput type=checkbox / My first checkbox/label/li
 lilabelinput type=checkbox / My second checkbox/label/li
 ...
 /ul

 I wanted to have that list sortable. Very easy task with Sortable:

 Sortable.create(list);

 Works fine except one issue:

 Safari and Firefox interpret the drag and drop as a click on the
 label. Clicking on the label changes the status of the checkbox. There
 must be a way to prevent this.

 Do you have any ideas how to do this.

 I used the Sortable callback onChange to save the checkbox status
 before the drop. The other callback onUpdate is fired before the click
 on the label takes effect. I would like to add another change listener
 to the checkbox that only takes effect when onUpdate was fired.

 On 13 Jan., 14:44, T.J. Crowder t...@crowdersoftware.com wrote:
  Hi Cyrus,
 
  I don't know much about script.aculo.us, but looking at it
  (dragdrop.js), Sortable isn't a class (in the loose way we use that
  word in this classless prototypical language JavaScript), it's just an
  object with a bunch of functions assigned as properties.  So you won't
  be able to extend it in this way.  Perhaps someone who's done more
  with script.aculo.us can point you to a convenient way to achieve the
  result you're looking for.
 
  FWIW,
  --
  T.J. Crowder
  tj / crowder software / com
  Independent Software Engineer, consulting services available
 
  On Jan 13, 1:27 pm, Cyrus arianglan...@googlemail.com wrote:
 
   Hi,
 
   I want to extend the Sortable class from the scriptaculous library.
   Where is my mistake? It's telling me SortableLabelList.create doesn't
   exist - I assumed it is inherited from Sortable.
 
   // extend
   SortableLabelList = Class.create(Sortable, {
   // redefine onHover
   onHover: function($super, element, dropon, overlap) {
   $super();
   console.log(element);
   console.log(dropon);
   console.log(overlap);
   }
 
   });
 
   // create list
   SortableLabelList.create(...);
 



-- 
Jerod Venema
Frozen Mountain Software
http://www.frozenmountain.com/
919-368-5105

--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: How would you calculate the avg() value of a row?

2009-01-13 Thread T.J. Crowder

Hi Richard,

Glad that was useful. :-)

 I've tried multiple things to coerce the
 value out of the cell but so far have not had much luck.  Any hints?

There are lots of ways to go.  Nich's answer is pretty easy to drop
into the function I gave you, though you might rename cells to
grades (and the cell parameter to the anonymous function with
grade), being sure to update the var statement, and replace this

cells = row.select('td.relevant');

...with

grades = row.select('input[id^=grade]');

...at which point this

val = parseInt(cell.innerHTML);

...becomes

val = parseInt(grade.getValue());

...which calls the Form.Element#getValue method[1] on each input.

[1] http://prototypejs.org/api/form/element/getValue

Or if you're using IDs for all this stuff, a different approach
entirely, based on IDs, might be called for.  That would be more in
line with Walter's suggestion [$F(id) is basically $(id).getValue()].

(I'm curious about the ID grade1.  Is that the first grade in the
row for a given student?  E.g., Joe has grade1, grade2, grade3, etc.?
If so, how are they differentiated from Nitin's grades in the next
row?  IDs have to be unique.)

Anyway, hope this gets you going.
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available

On Jan 14, 1:00 am, RNHurt rnh...@gmail.com wrote:
 T.J.,

 Thank you for the extraordinary help - your script worked right off
 the bat!  The only thing I'm struggling with right now is the fact
 that the cells I want to calculate are not just numbers but form
 elements.  So, cell.innerHTML is something like input id=grade1
 value=20 instead of 20.  I've tried multiple things to coerce the
 value out of the cell but so far have not had much luck.  Any hints?

 Thanx!
   Richard
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: Inheritance question

2009-01-13 Thread Cyrus

Hi,

thanks, but I already tried that yesterday:

I like the natural behaviour of the label. In every part of our
software you can click on the label to change the status of the
checkbox. I just don't like it happen when you use the drag and drop
function.

Is there a way to stop that event only after a drop?

I am seeing myself copying the whole Sortable because it cannot be
inherited.

On 14 Jan., 04:19, Jerod Venema jven...@gmail.com wrote:
 If you're trying to avoid the default behaviour for the label (which is to
 check/uncheck the appropriate form element), you may want to just use
 prototypes stop [1] function. I've never done this, but something like the
 following ought to work (I think):

 Event.observe('mylabel', 'click', function(evt){
   Event.stop(evt);

 });

 You'll probably want a $$('label') call instead of 'mylabel', but you get
 the idea.

 [1]http://www.prototypejs.org/api/event/stop



 On Tue, Jan 13, 2009 at 9:31 AM, Cyrus arianglan...@googlemail.com wrote:

  Ok, thanks.

  Let me describe my actual problem:

  I have a list with labels and checkboxes:

  ul id=list
  lilabelinput type=checkbox / My first checkbox/label/li
  lilabelinput type=checkbox / My second checkbox/label/li
  ...
  /ul

  I wanted to have that list sortable. Very easy task with Sortable:

  Sortable.create(list);

  Works fine except one issue:

  Safari and Firefox interpret the drag and drop as a click on the
  label. Clicking on the label changes the status of the checkbox. There
  must be a way to prevent this.

  Do you have any ideas how to do this.

  I used the Sortable callback onChange to save the checkbox status
  before the drop. The other callback onUpdate is fired before the click
  on the label takes effect. I would like to add another change listener
  to the checkbox that only takes effect when onUpdate was fired.

  On 13 Jan., 14:44, T.J. Crowder t...@crowdersoftware.com wrote:
   Hi Cyrus,

   I don't know much about script.aculo.us, but looking at it
   (dragdrop.js), Sortable isn't a class (in the loose way we use that
   word in this classless prototypical language JavaScript), it's just an
   object with a bunch of functions assigned as properties.  So you won't
   be able to extend it in this way.  Perhaps someone who's done more
   with script.aculo.us can point you to a convenient way to achieve the
   result you're looking for.

   FWIW,
   --
   T.J. Crowder
   tj / crowder software / com
   Independent Software Engineer, consulting services available

   On Jan 13, 1:27 pm, Cyrus arianglan...@googlemail.com wrote:

Hi,

I want to extend the Sortable class from the scriptaculous library.
Where is my mistake? It's telling me SortableLabelList.create doesn't
exist - I assumed it is inherited from Sortable.

// extend
SortableLabelList = Class.create(Sortable, {
        // redefine onHover
        onHover: function($super, element, dropon, overlap) {
                $super();
                console.log(element);
                console.log(dropon);
                console.log(overlap);
        }

});

// create list
SortableLabelList.create(...);

 --
 Jerod Venema
 Frozen Mountain Softwarehttp://www.frozenmountain.com/
 919-368-5105
--~--~-~--~~~---~--~~
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-scriptaculous@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
-~--~~~~--~~--~--~---