[Proto-Scripty] to NEW or not to NEW, that is the question

2009-08-20 Thread Mojito
Which is more proper? new Effect.Fade(..) or Effect.Fade(..) Both work for me. I'm just wondering which one is more cross browser compatible or runs faster. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Proto-Scripty] Typewriter effect

2009-08-20 Thread Mojito
Is there a Scriptaculous effect to spell out a word slowy: S SE SEN SENT SENTE SENTEN SENTENCE And also delete it slowly? SENTENCE SENTENC SENTEN SENTE SENT SEN SE S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[Proto-Scripty] Re: this keyword inside of the map function

2009-08-20 Thread Daniel Rubin
Andy Daykin wrote: Hello, I am having some difficulties writing a class, in my code I have a class where I need to be able to bind event listeners to values. In my code I want the variable pointerIndex to be accessible outside of the initialize function, but right now it is not. If I make

[Proto-Scripty] onclick functionality in ajax

2009-08-20 Thread hass
I have set up a relatively straight forward scenario where i have a listener for event A. On click of A (a button), I run an ajax request to update a div B. B was a large div, representing one of 3 panels on a page. B had some javascript functionality (lets call this event C) inside of it

[Proto-Scripty] Re: onclick functionality in ajax

2009-08-20 Thread T.J. Crowder
Hi, When you replace an element, the old element is no longer displayed (ideally it no longer exists) and a new element is put in its place. Any event handlers associated with the old element are not automatically transferred to the new one. There are a couple of ways to handle this: 1. Event

[Proto-Scripty] Re: onclick functionality in ajax

2009-08-20 Thread Alex McAuley
You need to re-observe the listeners Perhaps a pastie of your code would help us help you.. Alex Mcauley http://www.thevacancymarket.com - Original Message - From: hass dhasso...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Thursday,

[Proto-Scripty] Re: to NEW or not to NEW, that is the question

2009-08-20 Thread Alex McAuley
new defines an new instance of an Object / class. Some things dont need new and some do. It has nothing to dow tih Cross browser afaik Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Mojito tokyot...@gmail.com To: Prototype script.aculo.us

[Proto-Scripty] Re: help with select on element not working

2009-08-20 Thread T.J. Crowder
Hi Colin, Incidentally (and not on topic for your question) td/ is not valid in either HTML or XHTML. It's valid XHTML for an empty table cell. Wrong. It's a common misconception (which I had myself until recently). If so, it's a misconception the W3C's own validator shares. --

[Proto-Scripty] Re: Using Ajax.Request and evalJS to load functions on the fly

2009-08-20 Thread T.J. Crowder
Hi, Can you post a minimal, self-contained example[1] of the problem? [1] http://proto-scripty.wikidot.com/self-contained-test-page -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Aug 19, 2:39 pm, Donnie Carvajal

[Proto-Scripty] Re: Prototype breaks the IE8 native JSON parser.

2009-08-20 Thread T.J. Crowder
Hi, Wait! Stop the presses, are you saying IE8 has...a bug in it? ;-) (Oh, I shouldn't be mean to Microsoft, all browsers have bugs in them, and they seem to have made quite an effort in IE8.) Have you reported the bug to Microsoft? Seriously, though, thank you for doing the research to why it

[Proto-Scripty] Re: to NEW or not to NEW, that is the question

2009-08-20 Thread T.J. Crowder
Hi, In general, the correct thing is what the docs[1] say it is. Fade, Appear, and most others are just functions, not constructor functions, and so new is not correct. Some other things, like Effect.Opacity [2] (which confusingly use *exactly* the same capitalization -- don't shoot the

[Proto-Scripty] Re: this keyword inside of the map function

2009-08-20 Thread T.J. Crowder
Hi, Rather than binding it, use the second parameter to map (aka collect [1]), that's what the second param (context) is for. You'll find that most of the Enumerable methods that take callbacks also take a context parameter so the callback can be a method. [1]

[Proto-Scripty] Order in $H(responseJSON.Data)

2009-08-20 Thread buda
I have a problem: from server I receive such JSON string (resp.responseJSON.Data) { Data: { ABC: 6, NUI: 1, ITM: 10 . } } where elements in Data have the apropriate order When I do $H(responseJSON.Data) - I have hash object with different order of elements But I need

[Proto-Scripty] Re: Prototype breaks the IE8 native JSON parser.

2009-08-20 Thread Tobie Langel
This is a Prototype bug and will be fixed in version 1.7. In the meantime, please use Object.toJSON(...) instead. Best, Tobie On Aug 20, 10:53 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, Wait! Stop the presses, are you saying IE8 has...a bug in it? ;-) (Oh, I shouldn't be mean

[Proto-Scripty] Re: Order in $H(responseJSON.Data)

2009-08-20 Thread david
Hi Buda, you can't rely on browser internal way to store JSON. Each as its own way. The only thing you can do is to call a sort() function but in that case you'll also loose original order.** One thing I can propose is to modify data to have an numerical index to your data so calling a sort()

[Proto-Scripty] Re: ajax.request routine fails in IE

2009-08-20 Thread yuval dagan
hi Im using here ie 6 and it works. but, in ie the dom is ready only when the document is loaded so sometimes refering to an element is impossible before the dom is loaded. try moving the function call to the onload: body onload=setVar('world'); div id=var/div /body On 8/20/09, david

[Proto-Scripty] Re: ajax.request routine fails in IE

2009-08-20 Thread david
Hi Milko, which version of IE, because I test it with IE6, and it wotks. -- david On 18 août, 18:18, milko mi...@kretschmann.nl wrote: Hello, I made an ajax-routine using request and json, which works fine under all browsers except under IE. For the sake of illustration I made a

[Proto-Scripty] Re: Order in $H(responseJSON.Data)

2009-08-20 Thread Tobie Langel
Or better, yet, use an array. On Aug 20, 2:06 pm, david david.brill...@gmail.com wrote: Hi Buda, you can't rely on browser internal way to store JSON. Each as its own way. The only thing you can do is to call a sort() function but in that case you'll also loose original order.** One

[Proto-Scripty] Re: help with select on element not working

2009-08-20 Thread ColinFine
On Aug 20, 9:39 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Colin, Incidentally (and not on topic for your question) td/ is not valid in either HTML or XHTML. It's valid XHTML for an empty table cell. Wrong. It's a common misconception (which I had myself until

[Proto-Scripty] effect.multiple and effect.scale

2009-08-20 Thread blr21560
Hi, I run this line : Effect.multiple( tab, Effect.Scale); There are no effect. tab is an an array with two div elements. I run this line Effect.multiple( tab, Effect.Fade ); It's ok; Why ? Thanks, Bernard --~--~-~--~~~---~--~~ You

[Proto-Scripty] Ajax requests again

2009-08-20 Thread Alex Mcauley
earlier on in the month i posted on how to do some things with Ajax requests genericaly like adding a loading message to all requests and i got a couple of responses but not many. I've been giving it alot of thought and i cam up with addMethods as a way to add some things to the Ajax Class...

[Proto-Scripty] Re: Prototype breaks the IE8 native JSON parser.

2009-08-20 Thread T.J. Crowder
Tobie, What's the issue #? I'm curious how Prototype can work around this IE8 behavior... Cheers, -- T.J. On Aug 20, 1:04 pm, Tobie Langel tobie.lan...@gmail.com wrote: This is a Prototype bug and will be fixed in  version 1.7. In the meantime, please use Object.toJSON(...) instead.

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-20 Thread drewB
Unlikely. There is very little difference in computation effort between generating JSON, XML, HTML or delimited text at the server. I will have to take your word for this. I assumed it to be different. So why put it in two places? Why turn data into say JSON just so you can later turn it into

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-20 Thread bill
T.J. Crowder wrote: Hi, 'Tis indeed very easy. Say you have a form wrapped in a div: div id='formwrapper'form /form/div You can post it like so and take the result (which is presumed to be an HTML snippet in this case) and use that to update the container: new

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-20 Thread Alex McAuley
Bill You need to observe the form submit. $('the-id-of-the-form').observe('submit',function(event) { /// do the ajax that TJ said... Event.stop(event); // will stop it doing its default action! }); Alex Mcauley http://www.thevacancymarket.com - Original Message - From:

[Proto-Scripty] Re: POSTing a form via AJAX

2009-08-20 Thread bill
bill wrote: T.J. Crowder wrote: Hi, 'Tis indeed very easy. Say you have a form wrapped in a div: div id='formwrapper'form /form/div You can post it like so and take the result (which is presumed to be an HTML snippet in this case) and use that to update the container:

[Proto-Scripty] Re: Automatically Converting HTML to DOM (e.g. new Element ...)

2009-08-20 Thread DJ Mangus
Yes if your roundtrip is slow then doing it clientside can make it seem more responsive. There is the issue though of what happens if the server save fails? Revert your changes? Overall using serverside output is less troublesome, easier to code, and more robust. On 8/20/09, drewB

[Proto-Scripty] Re: help with select on element not working

2009-08-20 Thread T.J. Crowder
Thanks, Colin, glad it was something like that. -- T.J. :-) On Aug 20, 5:43 pm, ColinFine colin.f...@pace.com wrote: On Aug 20, 9:39 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi Colin, Incidentally (and not on topic for your question) td/ is not valid in either HTML

[Proto-Scripty] Re: this keyword inside of the map function

2009-08-20 Thread Andy Daykin
I tried the first suggestion, but the function still isn't getting called. TJ, can you explain more, or show an example of what the context param would look like? Should I just put the doSlide function as the 2nd parameter? -Andy -- From: T.J.

[Proto-Scripty] Re: Div Fades

2009-08-20 Thread Alex McAuley
Jason. How are you calling these functions ? Are you using an a tag by any chance Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Jason Frisvold xenopha...@gmail.com To: prototype-scriptaculous@googlegroups.com Sent: Thursday, August 20, 2009 9:17 PM Subject: