[Proto-Scripty] MILONIC

2009-04-29 Thread ArbolOne
Hi folks! I am getting my toes weat with MILONIC (http://www.milonic.com/ dm.php), and ther is something I would like to do different than what the standard MILONIC pulldown menu does. When the menu drops down, I want to click on the menu choice, but instead of opening the link in the current tab

[Proto-Scripty] cumulativeOffset and Internet Explorer

2009-04-29 Thread Bertrand
Hi, I'm having problems retrieving the offset of an iFrame in a document. Everything works perfectly on Firefox 3 and Safari, but on IE, it works at first (even though it returns different values) and then returns "null" for some reason. The element I'm calling the method on has been extended, e

[Proto-Scripty] Re: IE6 and InPlaceEditor Line Breaks not showing

2009-04-29 Thread David Grant
I was experiencing this today. I worked around it by passing the loadTextURL option causing the browser to populate the textarea with the content from that URL. HTH On Apr 13, 4:36 pm, "miller.scot...@gmail.com" wrote: > This problem has been baffling me for the past 16 hours, and I cannot > fin

[Proto-Scripty] Re: MILONIC

2009-04-29 Thread T.J. Crowder
Hi, Milonic's menus don't use Prototype, so I think this is off-topic for this group. I'd suggest asking over in Milonic's forums. -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Apr 28, 5:14 pm, ArbolOne wrote: > Hi folks! >  I am g

[Proto-Scripty] Re: Bug/Issue with autocompleter in IE7, first request doesn't appear, subsequent requests do

2009-04-29 Thread Sabri LABBENE
Hi, The problem also occur in 1.6.1_rc2 version of prototype. I upgraded from 1.6.0.3 to 1.6.1_rc2 to make IE7 deal right with dom:loaded event. I applied the patch to my new version of prototype and the problem is fixed. First requests now show result. Can someone confirm that applying the patch

[Proto-Scripty] Re: script.aculo.us Drag&Drop on the serverside

2009-04-29 Thread ColinFine
> PROBLEM > > > I am able to drag the images from the Panel-1 to the Panel-2 below;but > unfortunately unable to drop the image into the Panel-2. There are no > errors shown too. Complete functionality works well if I place the > controls on the client side, but doesnt work once the cont

[Proto-Scripty] Re: cumulativeOffset and Internet Explorer

2009-04-29 Thread Walter Lee Davis
Is your page valid HTML when you are at the point of asking for the offset? If you have a lot of "dynamic" stuff happening, you may not notice tags closed out of order or something like that which could throw off this calculation. Try building a simplified test case, often that will make th

[Proto-Scripty] Re: Using this.arrayname to add data to an array not working

2009-04-29 Thread ColinFine
As well as the references TJ gave, I've just read 'Javascript: The Good Parts' by Douglas Crockford (O'Reilly) and I can heartily recommend it. Colin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype & scri

[Proto-Scripty] Re: Using this.arrayname to add data to an array not working

2009-04-29 Thread T.J. Crowder
Doh! I meant to mention Crockford. Strong opinions, sometimes (not often) a bit off-base IMV, but very well informed and informative! Haven't read the book, but there's lots of good stuff on his website: http://javascript.crockford.com -- T.J. On Apr 29, 1:04 pm, ColinFine wrote: > As well as

[Proto-Scripty] autocompleter result list shifted to left !

2009-04-29 Thread Sabri LABBENE
Hi all, I'm using prototype-1.6.1_rc2 with scriptaculous-1.8.0. I have an autocompletion feature in my application. Autocompleter goes to LDAP gather usernames. I also have the possibility to enter in the textfield many users separated by ',' or ';'. The problem I'm facing happens with IE7 and IE6

[Proto-Scripty] Re: Ajax with charset iso-8859-1

2009-04-29 Thread Miguel Beltran R.
2009/4/26 Diodeus > > Miguel, > > I am having a similar problem and have spent many hours looking for an > answer.The answer I always get is: "serve it as UTF-8", which requires > the program answering the AJAX call to do the conversion. > Unfortunately the system I am using does not allow me to

[Proto-Scripty] InPlaceEditor help

2009-04-29 Thread infringer
I have a div, that contains two tables. Inside the first table I have an InPlace Editor. During the use of the application, the entire div can be replaced. Thus removing the IPE. But then the div can be replaced again, with the default view, which should have the IPE. When this happens, If you

[Proto-Scripty] Re: InPlaceEditor help

2009-04-29 Thread infringer
Nevermind, I figured out what it was. In my new code, I had a table cell with an id, and I needed a div inside a table cell! Because it inserts before and an invalid table format causes the stuff to be greyed out in firebug. Thanks anyway, -David On Apr 29, 10:10 am, infringer wrote: > I have

[Proto-Scripty] Last -1 In array

2009-04-29 Thread Jeztah
Hi I would like to get the last -1 of $$('.containers'); and if not exists to just return with no error .. whats the best way to go about this ? Thanks in advance Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

[Proto-Scripty] Re: Last -1 In array

2009-04-29 Thread Alex McAuley
So'k as normal i just engaged my brain and thought of the solution as soon as i pressed "post" !!! Alex - Original Message - From: "Jeztah" To: "Prototype & script.aculo.us" Sent: Wednesday, April 29, 2009 3:58 PM Subject: [Proto-Scripty] Last -1 In array > > Hi > > I would like to

[Proto-Scripty] event handling on ajax.request. how to add new event.observes when new data loads

2009-04-29 Thread Stucture_Ulf
I'm using event.observe to handle event handling and my aim is to have these in separate .js files and initiated through the dom:onload function when the pages is loaded instead of onclicks in the html markup. I'm initializing additional event.observes by using oncomplete to attach new event.obse

[Proto-Scripty] making Form.Observer return the updated element

2009-04-29 Thread louis w
Problem that I have always had with the Form.Observer is that it doesn't return the form element which was updated, just the actual form. Not that useful. While back I got the code below from someone (I think on this Google Group) which will return the element, however it doesn't work on forms wit

[Proto-Scripty] Re: making Form.Observer return the updated element

2009-04-29 Thread louis w
Actually it's not radios that are causing the problem. It happens if there are two inputs (text, hidden, etc) which have the same name. An error I know, but it causes a loop. On Apr 29, 11:28 am, louis w wrote: > Problem that I have always had with the Form.Observer is that it > doesn't return t

[Proto-Scripty] Re: event handling on ajax.request. how to add new event.observes when new data loads

2009-04-29 Thread Richard Quadling
2009/4/29 Stucture_Ulf : > > I'm using event.observe to handle event handling and my aim is to have > these in separate .js files and initiated through the dom:onload > function when the pages is loaded instead of onclicks in the html > markup. > > I'm initializing additional event.observes by usi

[Proto-Scripty] Get an array from PHP via Ajax.Request

2009-04-29 Thread Russell Keith
When doing calling Ajax.Request is there a way to take an array returned by PHP and read it into a JavaScript array? Or would I need to split the array in PHP to a comma separated string then read it back into an array in JavaScript? J. Russell Keith, MCDST Branch Suite Administrator Amer

[Proto-Scripty] Re: Get an array from PHP via Ajax.Request

2009-04-29 Thread Nicholas Steicke
Russell Keith wrote : > > When doing calling Ajax.Request is there a way to take an array > returned by PHP and read it into a JavaScript array? Or would I need > to split the array in PHP to a comma separated string then read it > back into an array in JavaScript? > > Try taking a look at JSON.

[Proto-Scripty] Extracting methods from codebase

2009-04-29 Thread Bertrand
Hi, My code makes use of Element's update method. It handles modification of an element's contents gracefully and isn't as risky as innerHTML. My problem is that I don't know how to extract it from the code (I wish I could link to Google's Prototype, but I work in an environment where filesize i

[Proto-Scripty] Re: cumulativeOffset and Internet Explorer

2009-04-29 Thread Bertrand
Sorry for rushing my post, it was indeed a problem with a malformed tag. Thanks for your kind answer. On Apr 29, 5:04 am, Walter Lee Davis wrote: > Is your page valid HTML when you are at the point of asking for the   > offset? If you have a lot of "dynamic" stuff happening, you may not   > not

[Proto-Scripty] Re: Ajax with charset iso-8859-1

2009-04-29 Thread Diodeus
Yup, doing it in UTF-8 end-to-end seems to be the right solution. We are converting our database as well. On Apr 29, 10:04 am, "Miguel Beltran R." wrote: > 2009/4/26 Diodeus > > > > > > > Miguel, > > > I am having a similar problem and have spent many hours looking for an > > answer.The answer

[Proto-Scripty] pimp my snippet?

2009-04-29 Thread Walter Lee Davis
Trying to keep people from uploading files with spaces in their filenames: //inside a change event observer on the field if($F("file") && $F("file").split(/(\/|\\\)/).last().include(" ")) ... //warning here Can anyone suggest a more elegant route? Thanks, Walter --~--~

[Proto-Scripty] Re: pimp my snippet?

2009-04-29 Thread Diodeus
if($F("file").indexOf(" ")) { alert('darnammit, no spaces Wilbur!') } On Apr 29, 1:29 pm, Walter Lee Davis wrote: > Trying to keep people from uploading files with spaces in their   > filenames: > >         //inside a change event observer on the field >         if($F("file") && $F("file").sp

[Proto-Scripty] Re: event handling on ajax.request. how to add new event.observes when new data loads

2009-04-29 Thread BrentNicholas
I personally do something like this, though I have to wonder is it bad practice? I get the content with a request and use the callbacks to do what I need, seems to work fine. Though I wonder about observer clean up since I don't unregister them anywhere. function getSelectsForm() { new Aja

[Proto-Scripty] Re: pimp my snippet?

2009-04-29 Thread Walter Lee Davis
Aha, but what about spaces in folders leading up to that filename? I don't mind those, since I only end up with the file, not the entire local path. Which was why I did the split + last() trick. A file field reports its value to JavaScript as the entire root-relative path to the file on th

[Proto-Scripty] Event.observe

2009-04-29 Thread BrentNicholas
Hi all, So I posted about this before but am still having troubles with Event.observe flaking out on me after a period of time. Here's the situation: The page runs and init's the app with: document.observe("dom:loaded", init); init() fires off: getSelectsForm() As you can see (below)

[Proto-Scripty] Re: Event.observe

2009-04-29 Thread Matt Foster
Hey Brent, Do you have a demo page that displays this issue? My only thoughts are that the elements are getting reloaded in the DOM yet not getting the events attached. -- http://positionabsolute.net On Apr 29, 2:59 pm, BrentNicholas wrote: > Hi all, > > So I posted about this before

[Proto-Scripty] Re: pimp my snippet?

2009-04-29 Thread Matt Foster
Just to have fun with it... var val = $F("file"); if(val.lastIndexOf(" ") > val.lastIndexOf("/")) On Apr 29, 2:52 pm, Walter Lee Davis wrote: > Aha, but what about spaces in folders leading up to that filename? I   > don't mind those, since I only end up with the file, not the entire   > loc

[Proto-Scripty] help with ajax.

2009-04-29 Thread Russell Keith
I got the pasted code form a vendor to make a call to their webservice. http://pastie.org/462963 I'm trying to do the same thing with proto but can't seem to get it to work. document.observe('dom:loaded', function() { new Ajax.Request(url, { method: 'post',

[Proto-Scripty] Re: Extracting methods from codebase

2009-04-29 Thread Matt Foster
I'd set up each class or major structure, such as Element, Enumerable, etc etc as its own file, then define packages such as minimal, efficient, advanced, ajax...etc. Then in a server side script it will bundle these files together depending on the package so you could make a request something li

[Proto-Scripty] Re: pimp my snippet?

2009-04-29 Thread Walter Lee Davis
Nice, very nice. Thanks, Walter On Apr 29, 2009, at 3:38 PM, Matt Foster wrote: > > Just to have fun with it... > > var val = $F("file"); > > if(val.lastIndexOf(" ") > val.lastIndexOf("/")) > > > > On Apr 29, 2:52 pm, Walter Lee Davis wrote: >> Aha, but what about spaces in folders leading up

[Proto-Scripty] Big problem in Form.Observe in latest stable w/ input type="file". Breaking applications.

2009-04-29 Thread louis w
Noticed a big problem between 1.6.0.2 and 1.6.0.3 with the Form.Observer. In the latest stable release (and I also checked the 'bleeding edge' release) it doesn't detect when input type="file" fields are changed. This is a big problem. Does anyone have a workaround for this? DEMO: Using 1.6.0.2

[Proto-Scripty] Re: Event.observe

2009-04-29 Thread BrentNicholas
Matt, I can post it shortly, will follow up. Thanks, BN On Apr 29, 1:35 pm, Matt Foster wrote: > Hey Brent, > >       Do you have a demo page that displays this issue?  My only > thoughts are that the elements are getting reloaded in the DOM yet not > getting the events attached. > > -- > > ht

[Proto-Scripty] Re: Extracting methods from codebase

2009-04-29 Thread Bertrand
That would indeed be another interesting way of doing it. The only problem is that javascript is often used in environments where filesize is critical. In my case, I only use ONE function from the library, because I've found it to be th best way to achieve what I want to do: Element.update. But b

[Proto-Scripty] Re: Extracting methods from codebase

2009-04-29 Thread Walter Lee Davis
There was a project getting started late last year called pulpjs that was aiming at this problem. It's sort of a port of Prototype with the following goals: no global namespace pollution, no extensions of native prototypes, and everything is modular and non-dependent. Have a look at their

[Proto-Scripty] Re: autocompleter result list shifted to left !

2009-04-29 Thread Sabri LABBENE
Hi all,Nobody had this problem before ?? Is there some attribute that scriptaculous should set for the div that will contain the result of the ajax query On Wed, Apr 29, 2009 at 2:42 PM, Sabri LABBENE wrote: > Hi all, > I'm using prototype-1.6.1_rc2 with scriptaculous-1.8.0. I have an > autocompl

[Proto-Scripty] Re: Overlapping sortable DIV

2009-04-29 Thread bruno
Any 1? --~--~-~--~~~---~--~~ 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-scriptaculous@googlegroups.com To unsubscribe from this group, send email to

[Proto-Scripty] Re: Extracting methods from codebase

2009-04-29 Thread Rick Waldron
Just sort of curious ... of all the convenience that prototype offers, why is the only method you "need" is Element.update()? Anyway, try this... (function() { function _$(args) { this.elements = []; for (var i = 0, len = args.length; i < len; ++i) { if (typeof args[i] == 'str

[Proto-Scripty] Re: autocompleter result list shifted to left !

2009-04-29 Thread G. Sharon Yang
my autocompleters are fine with IE 6 and IE 7, but in IE 8, the autocomplete fields shift to the right side, :(( since most of our customers use IE 6 and IE 7, I just leave the bug as it it for now. -S. On Wed, Apr 29, 2009 at 2:08 PM, Sabri LABBENE wrote: > Hi all, > Nobody had this proble

[Proto-Scripty] Re: Ajax.Autocompleter problem.

2009-04-29 Thread G. Sharon Yang
Are you sure you defined corresponding id for both textfield and the div, as in 'new Ajax.Autocompleter(id_of_text_field, id_of_div_to_populate, url, options)'? On Tue, Apr 28, 2009 at 8:33 PM, Nahuel Bulian wrote: > Hi there. > I'm trying to use the Script.aculo.us Ajax.Autocompleter, I can see

[Proto-Scripty] Re: Porting image preloading script from jQuery to Prototype

2009-04-29 Thread solidhex
And yet another iteration :D Hopefully this one doesn't cut off parts of the code. document.observe("dom:loaded", function() { $('main').update(''); var counter = 0; var links = $$("div#thumbs a").each(function(link) { new Element('img').observe("load",func