[Proto-Scripty] AJAX exception handling

2009-05-13 Thread Glenn Maynard
Exceptions inside AJAX handlers are sent to onException and then swallowed. The behavior I think most people would expect is that if they're not using any onException handlers, exceptions should be raised normally, not silently discarded. That's the behavior I want--for errors to always go to th

[Proto-Scripty] Ajax request onfailure

2009-05-13 Thread ioustinos
Hi there, i would like to be able to monitor whether i get a response or not from request, within a certain time. Using firebug, i can see that sometimes, the response does not come back(request indicated with red color on firebug), or takes too long to come back. On both those cases i would like

[Proto-Scripty] Setting the width of the sortable list

2009-05-13 Thread lun.ashis
Hi everyone, I have use the sortable list of scriptaculous and it's awesome. i want to create blank sortable list with fixed width say 100% so that i can drop either left or right side of the list and drag the list element from right to left. I have no idea how to do this, can anyone help me to

[Proto-Scripty] Re: Check element class against array

2009-05-13 Thread rai.ashis
Hi, i think you can you can use which will return either true or false depending upon. I think this one works. Thanks On Thu, May 14, 2009 at 12:19 AM, louis w wrote: > > I have an array containing a number of strings. I would like to > continue exucuting my script only if an item has ANY/AL

[Proto-Scripty] Re: DOM building methods

2009-05-13 Thread RobG
On May 13, 11:49 pm, "T.J. Crowder" wrote: > Hi, > > > As you can see third method is 4 times faster than first one. > > Yes. The third method largely evaluates to setting the innerHTML > property of the list element, which uses the browser's built-in HTML > processing. Reading HTML strings a

[Proto-Scripty] Re: url http://demo.script.aculo.us/ajax/autocompleter_customized doesn't works

2009-05-13 Thread G. Sharon Yang
this is a very strange phenomenon - I asked this question before, but it seems that other people don't care about this demo page. I never opened this page. I was told the dead link should be removed, but it's still there. This is my previous question and answers: fromdavid reply-to

[Proto-Scripty] Re: Help with Drag 'n Drop

2009-05-13 Thread rexus
Have a look here: http://zenofshen.com/posts/ajax-sortable-lists-tutorial and here: http://wiki.github.com/madrobby/scriptaculous/sortable :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo

[Proto-Scripty] Is this possible? can anyone provide a sample code please?

2009-05-13 Thread cmscardoso
What I want to do is create a mobile website. In the page I want to show the logo, and, first, a combobox with some options, and when one of that options is selected, than a second combobox should appear (without the need of the page to refresh all the contents) with other options. The user than s

[Proto-Scripty] Re: Fine art of coding

2009-05-13 Thread Benrifkah Bergsten-Buret
Hey Joker, A method is just a property of an object. You can access any property using either dot notation (i.e.: foo.property) or square brackets (i.e.: foo[property]). So you could do this: foo.myMethod(); // common way to call the method var methName = 'myMethod'; foo[methName](); // call

[Proto-Scripty] Check element class against array

2009-05-13 Thread louis w
I have an array containing a number of strings. I would like to continue exucuting my script only if an item has ANY/ALL of the strings assigned as a class name. $A(['foo', 'bar', 'foob']); Is there an elegant want to do this without having to loop through the items? --~--~-~--~~

[Proto-Scripty] Re: DOM building methods

2009-05-13 Thread Josh Powell
It's a very common development pattern/problem that comes up. Creating a bunch of repetitive DOM elements and inserting them into the page. It comes down to: 1) Native for loops will always be faster then calling a function that then does the loop 2) Native inserts are faster then library inser

[Proto-Scripty] Re: Queing effects

2009-05-13 Thread Walter Lee Davis
You might want to use the afterFinish() callback on one effect to call the next one. While Scripty effects guarantee to finish in the time they say they will, there may be network lag to account for if any of the events rely on Ajax callbacks. Chaining the effects through callbacks is rock

[Proto-Scripty] Queing effects

2009-05-13 Thread Jeztah
Evening guys, Does anyone know if i can queue effects in scriptaculous... Basically what i want to do is... On document loaded a div moves from one position to another (Effect.Move) then when its finished fire another Effect (Effect.Grow) after it... in the past i would do this with setTimeout an

[Proto-Scripty] Re: DOM building methods

2009-05-13 Thread Romek Szwarc
Thanks T.J. for this long answer. Maybe not many people will face such a performance problem, but this could be written in documentation, so we can avoid such issues at the beginning. This could be also good topic for PimpMyCode series at Prototype's blog. Greetings Romek 2009/5/13 T.J. Crowder

[Proto-Scripty] Fine art of coding

2009-05-13 Thread ferion
Hi everybody, i got a working function which fires a method on all objects (classes) with given parameters. Simplified i'm using the following code myClass = new Class( { coolFunction: function (arg) { alert(arg); } }); myArr[0] = new myClass(); myArr[1] = new myCl

[Proto-Scripty] Re: Ajax.Updater and JavaScript source files inclusions

2009-05-13 Thread almeidap
Thanks for all your advices T.J.! I read some snippets of the Proto- Scripty wiki and my dynamic script loading was in the right way. > It doesn't process them if you assign them as strings via innerHTML, > which is what your modified update would do (Element#update uses > innerHTML behind the sc

[Proto-Scripty] Re: DOM building methods

2009-05-13 Thread T.J. Crowder
Hi, > As you can see third method is 4 times faster than first one. Yes. The third method largely evaluates to setting the innerHTML property of the list element, which uses the browser's built-in HTML processing. Reading HTML strings and quickly turning those into the displayed result is fund

[Proto-Scripty] Re: prototype1.6.0.2 conflict with window.event.srcElement

2009-05-13 Thread T.J. Crowder
Hi, Prototype doesn't remove the srcElement property from window.event if it has one, so I can't see why having Prototype on the page would make that happen. I'm guessing something else is going on. (Separately: Note that window.event is an IE-only thing; other browsers pass the event into the

[Proto-Scripty] Re: DOM building methods

2009-05-13 Thread RobG
On May 13, 6:12 pm, keemor wrote: > Hi, > > I'd like to present 3 ways of building ul list and compare the speed > of them. > I used firebug's profiler on FF3 > > html: > >         go >         > > $('go').observe('click',go); > [...] > Third: > Time to build (513.747ms, 30054 wywołań) > fun

[Proto-Scripty] Re: DOM building methods

2009-05-13 Thread keemor
Use Profile from firebug manually or : console.profile([title]) & console.profileEnd() http://getfirebug.com/console.html On May 13, 12:32 pm, Иван Генчев wrote: > Hi, how did you collect timing data? I use FF3.5b4 with it's JIT > JavaScript engine an I would like to see how it will change thi

[Proto-Scripty] Re: Setting the value of a list

2009-05-13 Thread Jason
Ashis, Thank you! That worked perfectly. It must be something with IE8. I tested the syntax I was trying to use in Safari and FireFox and it worked fine in both browsers. IE8 is a disaster. Thanks again! Jason On May 13, 5:37 am, "rai.ashis" wrote: > Hi jason, > > try this => $("selectList").c

[Proto-Scripty] clonePosition

2009-05-13 Thread Alaa
Hello, >From it is name I expect that the two elements will have the same position after cloning the position, but nothing happens!!! here is the example Prototype examples function clonePosition(){ var firstElement = $('firstDiv'); var secondElement = $('secondDiv'); secondElemen

[Proto-Scripty] Re: Ajax.Updater and Field Validation conflict

2009-05-13 Thread Иван Генчев
Sorry, need to fix my own code. function dosubmit() { val = valid.validate(); if (val) { new Ajax.Updater( 'result', './test.php', { method: 'post', parameters: $('myform').serialize() } ); $('myform').reset(); } return val; } Иван Генчев wrote: > Sorry

[Proto-Scripty] Re: Ajax.Updater and Field Validation conflict

2009-05-13 Thread Иван Генчев
Sorry to be abrupt, but "return valid.validate()" is terminating this function. the "new Ajax.Updater..." is never going to execute. This should work: function dosubmit() { if (valid.validate()) { new Ajax.Updater( 'result', './test.php', { method: 'post', parameters: $('m

[Proto-Scripty] Re: DOM building methods

2009-05-13 Thread Иван Генчев
Hi, how did you collect timing data? I use FF3.5b4 with it's JIT JavaScript engine an I would like to see how it will change things for all three methods. keemor wrote: > Hi, > > I'd like to present 3 ways of building ul list and compare the speed > of them. > I used firebug's profiler on FF3 >

[Proto-Scripty] Re: Ajax.Updater and Field Validation conflict

2009-05-13 Thread MrEnglish
Hi Not quite. The validation is a library that does the stuff for me! I have changed thing a it that almost works: ... under the form I have the following: var valid = new Validation('myform'); function dosubmit() { return valid.validate(); new Ajax.Updater( 'result', './test.

[Proto-Scripty] Re: Setting the value of a list

2009-05-13 Thread rai.ashis
Hi jason, try this => $("selectList").childElements()[index].selected=true this will sets the value for your element. I hope this will work. Thanks Ashis On Tue, May 12, 2009 at 8:40 PM, Jason wrote: > > Hello, > > I'm not sure if this is an IE problem or a Prototype problem. > > I am tryi

[Proto-Scripty] prototype1.6.0.2 conflict with window.event.srcElement

2009-05-13 Thread wpf
today ,when i want to bind some event to a button,i add the prototype1.6.0.2 to my project and use then function of $ (xx).observe , and it works for me . but the question is that ,in my project need some vbscript to do with the data grid showing to the end user in the jsp file, and in

[Proto-Scripty] Setting the value of a list

2009-05-13 Thread Jason
Hello, I'm not sure if this is an IE problem or a Prototype problem. I am trying to set the value of a list via the following code; $('selectList').setValue('some_value'); I get an error stating that this object does not support this property or method. I have also tried these variants; $('s

[Proto-Scripty] Using new Element to insert options

2009-05-13 Thread robertc
When I'm populating a select element from the results of an Ajax call I'm having trouble using the Element constructor. If I create the element like this: var oOption = new Element('option', {'text':tag[i].firstChild.data}); It works in IE7 but not in Firefox3. If I create it like this: var

[Proto-Scripty] Help with Drag 'n Drop

2009-05-13 Thread rawghi
Hi friends, I'm first time poster and first time use r of the marvellous Drag'n Drop features of script.aculo.us. I've a problem (caused by my unexperience) that I cannot solve: I've 2 containers, when i drag an item from the first to the second, I need to send to an aspx page the id of the item

[Proto-Scripty] Ajax AutoCompleter Exception

2009-05-13 Thread virchete
Hello, I am using Ajax.Autocompleter is some pages. It runs perfect in other cases when the Javascript code and the div elements are included in a JSP file. The Ajax.AutoCompleter code is: new Ajax.Autocompleter("destHotels", "listResults",

[Proto-Scripty] DOM building methods

2009-05-13 Thread keemor
Hi, I'd like to present 3 ways of building ul list and compare the speed of them. I used firebug's profiler on FF3 html: go $('go').observe('click',go); First method: Time to build (2122.406ms, 84055 wywołań) function go(e){ e.stop(); $('list').update();

[Proto-Scripty] url http://demo.script.aculo.us/ajax/autocompleter_customized doesn't works

2009-05-13 Thread aperrin
Hello, the demo url http://demo.script.aculo.us/ajax/autocompleter_customized doesn't works. Anthony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send e