[Proto-Scripty] Replace $$ function

2009-01-13 Thread Lox
Hello, I want to integrate peppy (or sizzle) in prototype to replace $$() function. Can I safely replace the whole "Selector" class? Regards --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.acul

[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" To: "Prototype & script.aculo.us" 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.6

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

2009-01-13 Thread Richard Quadling
2009/1/13 Alex Mcauley : > > if its any help the same thing happens in google chrome !! > - Original Message - > From: "Cyrus" > To: "Prototype & script.aculo.us" > Sent: Monday, January 12, 2009 5:27 PM > Subject: [Proto-Scripty] Re: Opera and $$('.wrapper .class') seems not to > work c

[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" wrote: > 2009/1/13 Alex Mcauley : > > > > > > > if its any help the same thing happens in google chrome !! > > - Original Message - > > From: "Cyrus" > > To: "Prototype & script.aculo.us" > > Sent: Monday, January

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

2009-01-13 Thread RNHurt
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 fl

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

2009-01-13 Thread T.J. Crowder
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 r

[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 bu

[Proto-Scripty] Best way to apply an effect on page load?

2009-01-13 Thread Matt
Hi everyone. I'm producing an admin control panel script in PHP. It uses our favourite JS library to produce a tabbed interface. I have a div used for response text which displays to the user the result of their actions, eg, an error ("price must be a number") or success ("product was added!").

[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.query

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

2009-01-13 Thread T.J. Crowder
Hi Timo, My guess is that you're not specifying a doctype on your page. This came up a while ago: http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/48fc83937dccc493/6bde9cf40719edbb Details in the thread, but basically you need to specify a valid doctype for this to w

[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

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

2009-01-13 Thread Timo
Ahh yes thank you T.J. I usualy have it but for this project i copied the wrong stuff so it was not included and I compleatly missed to check that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.

[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 a

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

2009-01-13 Thread kangax
On Jan 13, 6:26 am, Cyrus 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: http://www.w3.org/TR/html4/strict.dtd";> http://ajax.googleapis.com/ajax/libs/prototype/

[Proto-Scripty] Inheritance question

2009-01-13 Thread Cyrus
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: funct

[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: http://www.w3.org/TR/html4/strict.dtd";> http://ajax.googleapis.com/ajax/libs/prototype/ 1.6.0.3/prototype.js" type="text/javascript"> document.observe('dom:l

[Proto-Scripty] Re: Inheritance question

2009-01-13 Thread T.J. Crowder
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

[Proto-Scripty] Re: Best way to apply an effect on page load?

2009-01-13 Thread T.J. Crowder
Hi, Would the dom:loaded event[1] provide the trigger you're looking for? Or am I missing the point, as seems likely. :-) If the real issue is identifying the correct div or something, it depends on how the tabs are being done, but you should be able to figure out which tab is "visible" and then

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

2009-01-13 Thread Cyrus
Ok, bug report is here: http://prototype.lighthouseapp.com/projects/8886-prototype/tickets/522-opera-and-wrapper-inner-does-not-work-correctly On 13 Jan., 14:30, "T.J. Crowder" wrote: > Hi Juriy, > > That inline script could muddy the water in terms of DOM availability, > etc.  Perhaps a minor m

[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 wrote: > On Jan 13, 6:26 am, Cyrus wrote: > > [...] > > > What would you suggest? File a bug report at Opera, Prototype or both? > > I can confirm this with 9.61 on Mac OSX

[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" 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

[Proto-Scripty] Re: Inheritance question

2009-01-13 Thread Cyrus
Ok, thanks. Let me describe my actual problem: I have a list with labels and checkboxes: My first checkbox My second checkbox ... 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 dra

[Proto-Scripty] Re: Best way to apply an effect on page load?

2009-01-13 Thread Matt
Hi TJ, thanks for the reply - that does sound about right for what I want, congrats! I tried this code: document.observe("dom:loaded", function() { var pageBox = $('editProducts').select('div.test'); Effect.SlideDown($(pageBox)); return false; }); the 'editProducts' part is the bit that nee

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

2009-01-13 Thread geoffcox
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 http://www.w3.org/TR/html4/l

[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: elemen

[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 (shoc

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

2009-01-13 Thread kangax
On Jan 13, 12:58 pm, "T.J. Crowder" wrote: > > 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 render

[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-li

[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 eac

[Proto-Scripty] help with Effect.Move onmouseover

2009-01-13 Thread George
Hi all, This is my first scriptaculous venture, and I am trying to apply Effect.Move with a sinoidal transition to a div when someone mouses over a link. I also apply Effect.Move to the same div (but in the opposite direction, I thought) when someone mouses out of that same link. So, basically, w

[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 myClassInstan

[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: Then use: document.getElementById("div" + (divCount+1)).className ='hiddenDiv'; and so on... On Jan 13, 8:56 am, geoffcox wrote: > Hello > > the code below works fine in IE but will onl

[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

[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 > > On Jan 12, 11:04 pm, Hamamoto Noriaki wrote: > > Hey Kangax, > > > > Thank you for the reply. > > Do you think the reason of the problem I met is because of using > > i

[Proto-Scripty] Re: Opera Mobile support

2009-01-13 Thread Laurent Dinclaux
> Yes it does (although prototype only parses function arguments, and > not function body). Could you open this page [1] in Opera Mobile and > check what the output is under "Function decompilation" section? I > created it specifically for testing mobile browsers. > > [...] > > [1] http://yura.thi

[Proto-Scripty] Re: Inheritance question

2009-01-13 Thread T.J. Crowder
Hi Dan, > You are confusing constructors with class definition He's not, actually, though I can see why you would think that. When you're creating a straight Sortable from script.aculo.us, you use Sortable.create, not new Sortable.[1] It's just the way Sortable was written, and it happens to u

[Proto-Scripty] Re: Opera Mobile support

2009-01-13 Thread kangax
On Jan 13, 5:48 pm, "Laurent Dinclaux" 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

[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 elements. So, cell.innerHTML is something like instead of "20". I've tried multiple things t

[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 http://www.w3.org/TR/html4/loose.dtd";> WM .visibleDiv { display : block } .hiddenDiv {

[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 > elements. So, cell.innerHTML is something like value="20"> instead of "20". I've tried multiple things to

[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', functio

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

2009-01-13 Thread Nich
On Wed, Jan 14, 2009 at 11:30, RNHurt wrote : > The only thing I'm struggling with right now is the fact > that the cells I want to calculate are not just numbers but > elements. So, cell.innerHTML is something like value="20"> instead of "20". I've tried multiple things to coerce the > value

[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" (

[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 a