[Proto-Scripty] InPlaceEditor Key events not working

2008-10-31 Thread mcrawford
I'm having problems getting the key events to work for me. On the demo page: http://github.com/madrobby/scriptaculous/wikis/ajax-inplaceeditor in the first example, hitting Esc does not cancel the form. As far as I can tell, it should, according to the function checkForEscapeOrReturn. Hitting

[Proto-Scripty] My Space Application

2008-10-31 Thread Ali Imran Ahmad
Hi, i am developing myspace application. I have a form which has large height so when i post data through ajax request it does call page and result shows at top but scroll bar remains same at bottom where I press the button to post form. Please anyone can help me out? scrollTo(0,0)

[Proto-Scripty] Re: curry Misunderstanding?

2008-10-31 Thread T.J. Crowder
Hi, Have you, by any chance, done any memory tests on this, T.J.? Nothing rigorous or replicable/quotable. Reading between the lines, you're thinking about premature optimization, aren't you? :-) One does definitely need to beware of PO, but any time you're creating a closure that's going to

[Proto-Scripty] Re: IE issue when with 'new Element' : expected identifier, string or number

2008-10-31 Thread T.J. Crowder
So it's probably a good and safe practice to quote all the element property names, right? Not necessarily a bad idea, although in practice I suspect the list of reserved words[1] is pretty set at this point (and I should have said JavaScript or ECMAScript, not JScript; class is reserved by the

[Proto-Scripty] Re: Sortable.create Issue with IE6 7

2008-10-31 Thread Paul Wesson
A guy I work with here has resolved the problem with an update to dragdrop.js added after line 804 just before: dropon.insertBefore(element, child); the following: if(oldParentNode!='undefined'){ oldParentNode.style.visibility = 'hidden'; oldParentNode.style.visibility = 'visible'; }

[Proto-Scripty] Re: Iframe issue with IE7 (probably 6)

2008-10-31 Thread Thomas A
Ok, here is a simple example: My main page containing an iframe: http://pastie.org/304806 And the referenced test.html inside the iframe: http://pastie.org/304808 If you load the main page you get the text I've been updated from the iframe at the bottom. If you then click on the link, which

[Proto-Scripty] Re: Effect.toggle slide doesn't work well with unordered/ordered list elements

2008-10-31 Thread david
Hi Paul, You'll have to change the HTML to: div class=menu h3 id=menu-headRECENTLY/h3 div id=menu-div ul id=menu-body liMenu List 1/li liMenu List 2/li liMenu List 3/li liMenu List 4/li liMenu List 5/li liMenu List 6/li liMenu List 7/li liMenu List 8/li

[Proto-Scripty] Re: Display:none causes script.aculo.us sliders to initialize incorrectly!

2008-10-31 Thread david
Hi Jack7890, Creating the slider is not a good idea inside a hidden div by the display attribute. Because the event can't initialize with hidden element (It's like the element does not exist). I think, but not tested, that you should first create sliders inside a visibility:hidden div and when

[Proto-Scripty] Re: Howto debug prototype

2008-10-31 Thread DrBenway
Maybe try using firebug On 30 okt, 19:47, Martín Marqués [EMAIL PROTECTED] wrote: I'm working on an on progress system which was left, almost finished by a former employee, developed with prototype. As far as I can see, it uses the menuItem, ajaxtabs and Accordion (maybe some others), and

[Proto-Scripty] Re: Strange .update Error?

2008-10-31 Thread T.J. Crowder
Hi Jonathan, What is this._question? Obviously update() works just fine in the normal case, people would have noticed otherwise. :-) Try this out: http://pastie.org/304786 I can use divs or spans or whatever with that, no issues. If you can create a small, self-contained example of the

[Proto-Scripty] Re: Howto debug prototype

2008-10-31 Thread T.J. Crowder
Hi, It sounds like this is more about script.aculo.us[1] than Prototype, but the answer's largely the same: Using a debugger. There's some useful links on the unofficial wiki's resources page: http://proto-scripty.wikidot.com/resources FYI, Firebug is less happy with Firefox 3 + Prototype

[Proto-Scripty] Source and Target in Sortable.create

2008-10-31 Thread Karthik Rajagopalan
Sortable.create('list1', { tree:true , onUpdate:function(sortable){ alert(sortable) } , handle: 'handle' , scroll:window , only:'drag' }); Here when i alert sortable, I get the source

[Proto-Scripty] Re: Element.update()

2008-10-31 Thread ColinFine
@Gabriel: unquoted keywords can be a problem in IE for certain reserved words (eg 'class'), but in general it's fine to leave them unquoted, and I've never seen a problem from this in firefox. So I don't think your advice is likely to be helpful in this case. @cyiam: Be aware that 'innerHTML' is

[Proto-Scripty] Re: Simple, unobtrusive way to open all links marked external

2008-10-31 Thread ColinFine
I'm not certain of this, but I think that using 'invoke' will get you the wrong binding: invoke calls the invoked function as a *method* on each element, ie. the element will be passed to openNewWindow as 'this', not as an argument. I think you just want filteredResult.each(openNewWindow);

[Proto-Scripty] Re: Strange .update Error?

2008-10-31 Thread kangax
On Oct 30, 5:20 pm, Jonathan Rosenberg [EMAIL PROTECTED] wrote: I'm having what I think is a weird problem with .update on IE. This statement fails:         this._question.update(divYou/div) but this works         this._question.update(spanYou/span) It fails in the prototype.js code,

[Proto-Scripty] Re: Autocompleting text fields (customized)

2008-10-31 Thread ColinFine
Oh, right. In that case you can put the email address in span class='informal', so it will appear in the list but not the input field. Then you'll need to provide an afterUpdateElement callback to extract it from the li and put it in your hidden field. Colin On Oct 31, 12:57 am, Sridhar

[Proto-Scripty] Re: Strange .update Error?

2008-10-31 Thread Jonathan Rosenberg
What is this._question? Obviously update() works just fine in the normal case, people would have noticed otherwise. :-) See below. this._question is a ref to $('question): div id=outer img id='tobi' src=/images/help/tobi.png / div

[Proto-Scripty] Re: My Space Application

2008-10-31 Thread Hector Virgen
Try using Element#scrollTo http://prototypejs.org/api/element/scrollto $('content').scrollTo(); On Thu, Oct 30, 2008 at 10:58 PM, Ali Imran Ahmad [EMAIL PROTECTED]wrote: Hi, i am developing myspace application. I have a form which has large height so when i post data through ajax request it

[Proto-Scripty] Re: Simple, unobtrusive way to open all links marked external

2008-10-31 Thread kangax
On Oct 30, 2:07 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi guys, I'm learning the prototype library after coming from jQuery, and I'm trying to write a simple snippet that opens external links in a new window. This doesn't seem to work in Firefox, or Safari, and I'm not sure what

[Proto-Scripty] Re: Effect.toggle slide doesn't work well with unordered/ordered list elements

2008-10-31 Thread Paul Kim
Thanks for the solution David. Do you have any idea why this worked for Opera when the ul element wasn't encapsulated inside a div element? - Paul On Fri, Oct 31, 2008 at 4:42 AM, david [EMAIL PROTECTED] wrote: Hi Paul, You'll have to change the HTML to: div class=menu h3

[Proto-Scripty] JSON formatting question

2008-10-31 Thread Walter Lee Davis
Does JSON really have to be all one long line of text? Is there a way to break it over lines without getting a syntax error? What are the rules for this? I am generating a database for local searching on a CD-ROM. This ends up being 370K of text in two lines (titles and authors). TextMate

[Proto-Scripty] Re: Strange .update Error?

2008-10-31 Thread Jonathan Rosenberg
Jarkko, Excellent thought that was the problem. That idea ran through my mind also, but I thought that since P was a block-level element, it would be ok. Thanks. -- Jonathan Rosenberg Founder Executive Director, Tabby's Place http://www.tabbysplace.org/ -Original Message- From:

[Proto-Scripty] Re: JSON formatting question

2008-10-31 Thread Walter Lee Davis
On Oct 31, 2008, at 11:37 AM, T.J. Crowder wrote: Does JSON really have to be all one long line of text? No, not according to the specs[1]: Whitespace can be inserted between any pair of tokens. I've definitely used newlines in real-world apps using Prototype's built-in handling for JSON

[Proto-Scripty] Re: Effect.toggle slide doesn't work well with unordered/ordered list elements

2008-10-31 Thread Matt Foster
Effect.Slide needs an immediate child to perform the clipping necessary for the effect. On Oct 31, 9:56 am, Paul Kim [EMAIL PROTECTED] wrote: Thanks for the solution David. Do you have any idea why this worked for Opera when the ul element wasn't encapsulated inside a div element? - Paul

[Proto-Scripty] testing whether all elements in a div have a certain class

2008-10-31 Thread Matt
This should be an easy one but it's been a long day... Let's say I have this structure: div id=container span class=on1/span span class=off2/span span class=on3/span /div Basically, I have a function that I only want to run when all three of the spans are set to 'on'. Since this is

[Proto-Scripty] Error with droppable

2008-10-31 Thread Alejo
Hi! I am building an interactive application with Google Maps API and I am also using PrototypeScriptaculous through Google Ajax API's. The problem I have is with a droppable. It worked well some days ago, and I haven't changed (as far as I am concerned) anything relative to it. When I try to

[Proto-Scripty] Re: Howto debug prototype

2008-10-31 Thread Martín Marqués
2008/10/31 T.J. Crowder [EMAIL PROTECTED]: Hi, It sounds like this is more about script.aculo.us[1] than Prototype, but the answer's largely the same: Using a debugger. There's some useful links on the unofficial wiki's resources page: http://proto-scripty.wikidot.com/resources FYI,

[Proto-Scripty] Re: testing whether all elements in a div have a certain class

2008-10-31 Thread Jarkko Laine
On 31.10.2008, at 21.25, Gabriel Gilini wrote: I'm thinking $$(eval('#container_'+boxID+' span')); Don't know if it's the right thing to do though. Why would you want to eval that string? Matt, could you elaborate a bit more? $$('#container_'+boxID+' span'); actually looks to be fine.

[Proto-Scripty] Re: testing whether all elements in a div have a certain class

2008-10-31 Thread kangax
On Oct 31, 1:21 pm, Matt [EMAIL PROTECTED] wrote: Thanks kangax, that worked well. One question: since I'm working with dynamically-generated code, is there some way I can concatenate variable names? For instance, this code is working in a function, so I actually want to use an ID number to

[Proto-Scripty] OT: help with dinamic links and observe

2008-10-31 Thread Miguel Beltran R.
Hi list I use Zope for programing. Using a loop inser varius rows, example tr tdname1/tdtda href=javascript: modify(1,123)My name/a/td tdname1/tdtda href=javascript: modify(1,44)My name/a/td ... /tr How can do it the same using observe and dom:loaded? --

[Proto-Scripty] autocompleter resizes my textbox in IE to fit selection

2008-10-31 Thread speedster
Hello, In IE6 when I make a selection from autocompleter's drop down options, in some cases, the autocompleter widens my textbox, when inserting the selection, to the length of the selected text. This in turn causes rearrangement of stuff on my page which I don't want. I have the size attribute

[Proto-Scripty] find all event listeners on an element

2008-10-31 Thread AOOSdev
Is there a way to find out all the event listeners assigned to a given element? I'm debugging an app that assigns and removes different event listeners according to the stage of data entry. It would help tremendously if I could use a Firebug break point and see what listeners are currently

[Proto-Scripty] Re: Howto debug prototype

2008-10-31 Thread Miguel Beltran R.
Maybe with http://www.mozilla.org/projects/venkman/ 2008/10/31 Martín Marqués [EMAIL PROTECTED] 2008/10/31 T.J. Crowder [EMAIL PROTECTED]: Hi, It sounds like this is more about script.aculo.us[1] than Prototype, but the answer's largely the same: Using a debugger. There's some

[Proto-Scripty] Re: testing whether all elements in a div have a certain class

2008-10-31 Thread Gabriel Gilini
Indeed, I don't know why I said that lol.I guess I was thinking of var or function name. Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] On Fri, Oct 31, 2008 at 6:20 PM, Jarkko Laine [EMAIL PROTECTED] wrote: On 31.10.2008, at 21.25, Gabriel Gilini wrote: I'm thinking

[Proto-Scripty] Effect.toggle('slide'), Effect.SlideUp, Effect.SlideDown is problematic in Opera

2008-10-31 Thread kimbaudi
Hi, if you check the demo for Effect.toggle('slide'), Effect.SlideUp, Effect.SlideDown using the Opera browser, you will notice that you get Effect.toggle('blind'), Effect.BlindUp, Effect.BlindDown effect instead. http://github.com/madrobby/scriptaculous/wikis/effect-toggle