[Proto-Scripty] things that I'd love to see on the next verion of prototype

2011-08-20 Thread Ran Berenfeld
guys I'm running a wonderful website with prototype, the israeli chess website atwww.ichess.co.il here are some stuff that I think are missing from prototype : 1. mouse wheel event (I found some custom code that did it) 2. ajax abort method 3. error handling (cross browser code that catches errors

[Proto-Scripty] 2 questions about offsets

2011-07-25 Thread Ran Berenfeld
Hello all. 2 questions : 1. can someone please explain the difference in all the "offset" functions : - cumulativeOffset - cumulativeScrollOffset - positionedOffset<

[Proto-Scripty] problem using prototype 1.7 POST with chrome browser

2011-02-07 Thread Ran Berenfeld
Hello all I'm encountering a strange problem. i'm using ajax code that sends a JSON'ed object using port. here is a snippets : function ajaxRequest(url, command, handler) { ... ichess_info.comm[url].request = new Ajax.Request(ichess_info.comm.servlet_base + url, { method: "post",

Re: [Proto-Scripty] Re: local variables for for() array iteration

2011-01-19 Thread Ran Berenfeld
Thank you for the advise. one more / last question to clarify. In one of the articles about javascript scopes I read that using "var" inside a class constructor actually creates a "private member" of the class. is it true ? if this is true, then should I avoid using for (var i=0;iwrote: > @RĂ¼dige

[Proto-Scripty] local variables for for() array iteration

2011-01-19 Thread Ran Berenfeld
Hello all sorry for this stupid question, but all these talks about the "*this" pointer and the variable scope in js got me confused. support I have 2 functions, one calling the other inside array iteration. can they both use the same local variable for array index ? should I use a "var" statement

[Proto-Scripty] Element.measure("right")

2010-12-01 Thread Ran Berenfeld
Hello all can anyone explain to me an issue with RTL measurement I have a right aligned website (all elements with direction:rtl) when I measure a DIV, using element.measure("right"), I get different result in IE vs Firefox (seems like Firefox returns the correct result, whereas IE returns the DIV

[Proto-Scripty] prototype 1.7

2010-09-12 Thread Ran Berenfeld
Can we have some info about the progress of the final 1.7 release ? Thanks Ran -- 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 thi

[Proto-Scripty] Firefox 3.6.8 error upon evalJSON(...)

2010-08-22 Thread Ran Berenfeld
My entire project, http://www.ichess.co.il although the site is working OK with FF, the javascript console always shows warning such as these, when ever the response is parsed using evalJSON(ajax response text) can anyone help ? Thanks Ran Error: syntax error Source File: http://localhost/servle

[Proto-Scripty] Ajax abort method

2010-07-22 Thread Ran Berenfeld
I'm sure this was asked before. I'm running a web site with continuous ajax calls to the same server page. Now I want that if the Ajax is not completed in (say) 5 seconds, the call will be aborted and a new call s made. I've seen pages in the web that suggests an implementation for an abort method.

[Proto-Scripty] "onchange" event not working for INPUT type="text" element in IE

2010-06-19 Thread Ran Berenfeld
I inserted a text input element, and did Element.observe("change") on the element when I enter some text and press ENTER, I receive the handler, but this only happens in chrome and FF. in IE, I don't receive the handler. can you please tell me the reason ? what is the proper way to listen to this

[Proto-Scripty] DOM elements updates

2010-06-15 Thread Ran Berenfeld
Hello I have a general question that disturbs me, especially since I see some strange behaviors sometimes. support I have a new DOM Element, created using new Element("tag") and I have 2 things to do : 1. update the element attributes, css inline styles, add css classes, etc 2. insert the element

Re: [Proto-Scripty] Re: Problem with absolutize()

2010-06-01 Thread Ran Berenfeld
alist_, self-contained test page[1] demonstrating it? > > [1] http://proto-scripty.wikidot.com/self-contained-test-page > -- > T.J. Crowder > Independent Software Consultant > tj / crowder software / com > www.crowdersoftware.com > > > On Jun 1, 7:37 pm, Ran Berenfeld wro

Re: [Proto-Scripty] Re: Problem with absolutize()

2010-06-01 Thread Ran Berenfeld
e try..catch, you'll get more information if you do this: > >catch (e) { >alert(e.message ? e.message : String(e)); >} > > ...because IE usually (always?) throws objects with a `message` > property when throwing errors. > > HTH, > -- > T.J. Cro

Re: [Proto-Scripty] Problem with absolutize()

2010-06-01 Thread Ran Berenfeld
sage tell you? > > On Tue, Jun 1, 2010 at 11:12 AM, Ran Berenfeld wrote: > >> Hello >> >> I'm trying Prototype 1.7 RC 2 and I have a problem >> this is the code that is running : >> >>$$("li.horizontal").each( function(elem) {

[Proto-Scripty] Problem with absolutize()

2010-06-01 Thread Ran Berenfeld
Hello I'm trying Prototype 1.7 RC 2 and I have a problem this is the code that is running : $$("li.horizontal").each( function(elem) { elem.observe("mouseover", subMenuShow); var menu = $(elem.id + "Menu"); alert(menu); alert("1"); menu.absolutize(); alert("2"); In chrome it works, however i

Re: [Proto-Scripty] Re: using "with" statement

2010-04-30 Thread Ran Berenfeld
y, `window`, it > points to itself with). That's why when you declare variables and > functions at global scope, they magically show up as properties on > `window`. > > [1] http://yuiblog.com/blog/2006/04/11/with-statement-considered-harmful/ > [2] http://meyerweb.com/eric/com

[Proto-Scripty] using "with" statement

2010-04-29 Thread Ran Berenfeld
Hi all I have written a class using prototype Class object and after playing it for a while, I saw that I need to use the "with" keyword in the class members, so I can access its members here is the relevant part of the class : (the member is "_div") var JSClass = Class.create ({ initialize:

[Proto-Scripty] Another help with $$ needed

2010-04-19 Thread Ran Berenfeld
Hello Is there a way to do something like $$("xxx").hide() ? (instead of iteration over the array) i.e "extend" the Array JS object with some more functions ? I have many places that are doing the same thing (iterating on the array to call a method) -- You received this message because you are s

Re: [Proto-Scripty] Re: using $$

2010-04-19 Thread Ran Berenfeld
m afraid I don't know what you mean by "store it to a timer", so I > can't comment on that. If you post some sample code, happy to take a > look, but your use of `$$` is just fine. > > HTH, > -- > T.J. Crowder > Independent Software Consultant > tj / cr

[Proto-Scripty] using $$

2010-04-19 Thread Ran Berenfeld
Hello I tried to use $$ to make flash effect on some elements in my site the code looked like this : var itemsArray = $$("a.resultsSummary"); for (var i=0;i < itemsArray.length;i++) { var item = itemsArray[i]; alert(item);