[Proto-Scripty] Re: limit number of éléments in a dropzone

2008-10-28 Thread bronson
No way to get a hand ? On 26 oct, 19:10, bronson [EMAIL PROTECTED] wrote: Hi every body, I want to freeze the drag from the dragzone when the dropzone's elements'length reach, for example, 3 elements and i wih to trigger an alert message, advising the visitor that the dropzone can't exceed

[Proto-Scripty] Problem with prototype.js

2008-10-28 Thread PAM
hi all, i m working with prototype.js 1.6 and drag n drop when i m using this code :new Element.insert(div, {top:content}); i m passing into this method : Element._getContentFromAnonymousElement = function(tagName, html) { var div = new Element('div'), t =

[Proto-Scripty] Re: Problem with prototype.js

2008-10-28 Thread PAM
hi thanks for your response more precisions: i m using rico (2.0rc2) with protoype.js and this code : http://pastie.org/302127 i don t write this code, just use it and try to understand it ;) (see http://www.ajaxprojects.com/ajax/tutorialdetails.php?itemid=65) all working fine with

[Proto-Scripty] Problem with the sortable system

2008-10-28 Thread Benjamin
Hi guys, I'm having some troubles with the sortable system. Here's a simple example of my code : a href=# onclick=reload();Reload/a ul id=my_ul li id=li_1test 1/li li id=li_2test 2/li /ul script type=text/javascript Sortable.create('my_ul', { onChange:function(){

[Proto-Scripty] Autocompleter Updater

2008-10-28 Thread James Hoddinott
I have an input element with id 'searchtickets' linked to Autocompleter so that potential search results are returned as the user types characters in. Updater is then called to update a div element with id 'dmain' based on that search result. So far I have the following javascript:

[Proto-Scripty] Re: Problem with the sortable system

2008-10-28 Thread Benjamin
I tried replacing the reload() function by : function reload() { var ul= $('my_ul'); ul.update('li id=li_3test 3/lili id=li_4test 4/li'); } without any success. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[Proto-Scripty] Re: Problem with the sortable system

2008-10-28 Thread Benjamin
Well I also tried it earlier, but I tried again and it's not working : function reload() { text = file('ajax.php?action=reload'); if (text != 0) writediv(texte, 'my_ul'); } and the ajax.php file : if ($_GET['action'] == 'test') { echo 'li id=li_3test

[Proto-Scripty] Re: Problem with the sortable system

2008-10-28 Thread T.J. Crowder
Hi, What does writediv do? Does it eval scripts? If not... Try putting together a complete, but very small, example showing the problem and posting it to Pastie[1]. You'll probably figure out the problem in the process of doing that. If not, it gives people something to look at. I'd be

[Proto-Scripty] Re: Problem with the sortable system

2008-10-28 Thread T.J. Crowder
LOL Glad I could help. -- T.J. On Oct 28, 3:24 pm, Benjamin [EMAIL PROTECTED] wrote: Damn you T.J. Crowder I love you ! You solved the problem I had for like a week ! Here's a simple example : head titleSortable list/title script src=lib/prototype.js type=text/javascript/script script

[Proto-Scripty] Re: trouble with delayedobserver

2008-10-28 Thread ecb
I need it once. I've done some testing on this. Everything in the callback function is called twice. In fact, the callback function is initialized twice when the page is loaded, which I confirmed by putting an alert in the initialize block of the class definition (in controls.js). On Oct 23,

[Proto-Scripty] Re: php-like variable variables in Prototype syntax?

2008-10-28 Thread Walter Lee Davis
On Oct 27, 2008, at 10:42 PM, kangax wrote: On Oct 27, 1:20 pm, Walter Lee Davis [EMAIL PROTECTED] wrote: Is there a more Prototype way to construct a variable key within JavaScript, similar to what you can do in PHP? For example, in PHP, if I had the string 'title' assigned to the

[Proto-Scripty] Re: trouble with delayedobserver

2008-10-28 Thread Walter Lee Davis
See what happens if you do this: var simplefunction = function(){ alert('howdy!'); } new Form.Element.DelayedObserver( 'inputfield', .50, simplefunction); //just the var name of the function, no parens after it... I think this might be one of those issues where you mean to name a

[Proto-Scripty] Re: Get sub divs?

2008-10-28 Thread [EMAIL PROTECTED]
Hello, i try many times but i i get always undefined when i try this alert($(sourceid).select('entry').innerHTML); or this alert($(sourceid).select('RECHNUNGID').innerHTML); or this alert($(sourceid).select('RECHNUNGID').valu; :( T.J. Crowder schrieb: Hi Stefan, If you're just

[Proto-Scripty] Re: php-like variable variables in Prototype syntax?

2008-10-28 Thread kangax
On Oct 28, 1:23 pm, Walter Lee Davis [EMAIL PROTECTED] wrote: On Oct 27, 2008, at 10:42 PM, kangax wrote: On Oct 27, 1:20 pm, Walter Lee Davis [EMAIL PROTECTED] wrote: Is there a more Prototype way to construct a variable key within JavaScript, similar to what you can do in PHP? For

[Proto-Scripty] get all values?

2008-10-28 Thread [EMAIL PROTECTED]
i have many divs with the same id . How can i get them all and check them to be = another value? i try this: while($('targetid').next('RECHNUNGID')) { alert('x'); }

[Proto-Scripty] Re: Get sub divs?

2008-10-28 Thread kangax
On Oct 28, 2:22 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, i try many times but i i get always  undefined when i try this alert($(sourceid).select('entry').innerHTML); or this alert($(sourceid).select('RECHNUNGID').innerHTML); or this

[Proto-Scripty] Re: get all values?

2008-10-28 Thread [EMAIL PROTECTED]
How can i get and irretate a specified class? On Tue, Oct 28, 2008 at 1:58 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: i have many divs with the same id . An element ID MUST be unique for the whole page. Use a class instead, then use the $$() method to fetch them all. -justin

[Proto-Scripty] Re: get all values?

2008-10-28 Thread Justin Perkins
given this: div class=foo/div div class=foo/div div class=foo/div div class=foo/div do this: $$('div.foo').each(function(div){ alert(div); }); The each method is an *iterator*. http://prototypejs.org/api/enumerable/each -justin --~--~-~--~~~---~--~~ You

[Proto-Scripty] Re: Disabling Scriptaculous autocomplete

2008-10-28 Thread Perryism
This is how I fixed it. open scriptaculous/controls.js adding a new property, disable, to the autocompleter and set it to false as default. this.disable = false; In onObserverEvent, replacing if(this.getToken().length=this.options.minChars) with

[Proto-Scripty] Storing Control.Slider objects in an array

2008-10-28 Thread jack7890
I'm trying to use a for loop to initialize a large number of script.aculo.us sliders. I'm finding that, for some reason, I'm unable to store control.slider objects in an array. For example, consider this code: [code] var contextRaters_primary = new Array(); for(var i = 0; i 1; i++) { var

[Proto-Scripty] Re: Storing Control.Slider objects in an array

2008-10-28 Thread kangax
On Oct 28, 8:37 pm, jack7890 [EMAIL PROTECTED] wrote: I'm trying to use a for loop to initialize a large number of script.aculo.us sliders.  I'm finding that, for some reason, I'm unable to store control.slider objects in an array.  For example, consider this code: [code] var

[Proto-Scripty] $$() and Element.observe() question

2008-10-28 Thread kimbaudi
Hi, I am having trouble with using Element.observe() with $$(). If I have an element with id=id, I can do this: $('id').observe('click', function() {alert('clicked');}); However, if I have elements with class=class, I can't do this: $$('.class').observe('click', function()