[Proto-Scripty] Re: $F() cannot get radio button values?

2009-07-30 Thread Pong
I found a solution in the following link but is that means $F is only for textbox? http://proto-scripty.wikidot.com/prototype:tip-fetching-radio-button-value Element.addMethods('form',{ getCheckedRadioValue: function (formElement, name) { formElement = $(formElement); var

[Proto-Scripty] Event onDrop on Sortable class

2009-07-30 Thread Christophe
Hello, I am using the Sortable class for handling drag drop between 3 different columns. In my code, I would like to trigger some method calls just after the drag is ended. I was then looking for an onDrop option, but it doesn't seem to be taken into account. Is this option supposed to be

[Proto-Scripty] Re: problems with observe mouseover and mouseout

2009-07-30 Thread Christophe
I have a realy similar issue as this one, but more on the mouseout event. Effectively, if I observe a mouseout on a ul, every time my mouse goes from one li to the other, a mouseout event is triggered. I tried to make a check in the target function to see which element was doing the call, but I

[Proto-Scripty] Re: problems with observe mouseover and mouseout

2009-07-30 Thread T.J. Crowder
Hi, I have a realy similar issue as this one, but more on the mouseout event. Effectively, if I observe a mouseout on a ul, every time my mouse goes from one li to the other, a mouseout event is triggered. That's right, that's how mouseout is supposed to work, but it's a real pain. What you

[Proto-Scripty] support for svg element?

2009-07-30 Thread Cédric
Hello all, This is my first time here. I've been using prototype.js for several years now, and still love it :-) I've recently found a project named Raphaël (http://raphaeljs.com) and started playing with it. But I have a problem with the canvas svg element used by Raphael. I don't know a lot

[Proto-Scripty] Re: IE8 invalid argument line 4501

2009-07-30 Thread Eirik
I encountered this error in all versions of IE8 without non-alpha IDs. After a lot of debugging and head scratching i discovered that if you register an observer on the 'dom:load' event in a constructor (initialize) thats supposed to fire one of the object methods (like 'this.recolour()') it will

[Proto-Scripty] Re: IE8 invalid argument line 4501

2009-07-30 Thread T.J. Crowder
Hi, ...if you register an observer on the 'dom:load' event in a constructor (initialize) thats supposed to fire one of the object methods (like 'this.recolour()') it will end up as an infinite loop in IE6, IE7 and IE8... Can you post a small, self-contained, complete example demonstrating

[Proto-Scripty] Re: Effect.Morph query

2009-07-30 Thread Andrew Dodd
I'm not really sure how to, I've been messing with it for a couple of days to no avail. I have been trying to use a variable to achieve this so that th onClick does the following in this order: 1./ Reset the morph effect on the lastPlayed element 2./ Apply the morph effect to the clicked

[Proto-Scripty] Re: Effect.Morph query

2009-07-30 Thread Alex McAuley
Can you give an example of your code in a pastebin and i will ammend it to do what it needs to. Regards Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Andrew Dodd a...@slicethepie.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com

[Proto-Scripty] Re: Event onDrop on Sortable class

2009-07-30 Thread Alex McAuley
There is some options in draggable onEnd: function() {} HTH Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Christophe cdebuss...@gmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, July 29, 2009 10:53 PM

[Proto-Scripty] Re: Manipulating the ghostly Clone

2009-07-30 Thread ferion
You are right Mr. Fine. But altering the source of prototype itself ist critical if you do want to update the library constantly. I would need to change the fragment every new release. My version is dirty, but until the browser behave differently i need to use this. Thx Joker

[Proto-Scripty] Re: ternary operators

2009-07-30 Thread Rick Waldron
Drop the parens around the first argument. function foo(arg) { return $(arg) ? true : alert('Element Does not exist'); // i commented this out: false; } ... On Tue, Jul 28, 2009 at 12:02 PM, Alex McAuley webmas...@thecarmarketplace.com wrote: In my usual Not enough coffee moments i

[Proto-Scripty] Re: ternary operators

2009-07-30 Thread Alex McAuley
Sorry you missed the point i was trying to achieve. I wanted the operator to in essence evaluate 2 responses for example. alert('Element Does not exist'); alert('The second responsee'); However it cannot be achieved so it must be done usung if/else.. Regards Alex Mcauley

[Proto-Scripty] Re: Masked Input in Prototype

2009-07-30 Thread Celso
Unfortunately I am no expert in prototype. I can not believe that someone has developed a prototype mask! I try to use prototype and jquery together, Works: http://docs.jquery.com/Using_jQuery_with_Other_Libraries But .. the plugin does not works. On 29 jul, 18:27, Alex McAuley

[Proto-Scripty] Re: IE8 invalid argument line 4501

2009-07-30 Thread Eirik
This will reproduce the issues sometimes (http://pastie.org/565352), but it is not consistent. In principle its the same code that cause the invalid handeler at line 4501, but it only produces the issue occationaly. When running it causes a stack overflow at first, and then produce the error at

[Proto-Scripty] Eventchain click and drag

2009-07-30 Thread ferion
Hello everybody, another problem occured while coding complex stuff. I try to bind 2 events on one Element like this: this.Dragger = new Draggable($(this.widgetToolId),{revert: this.shallIToolRevert.bind(this), onStart:this.startDrag.bind(this), onEnd:this.stopDrag.bind(this),

[Proto-Scripty] Re: how to use scripts without clicks

2009-07-30 Thread David McGlone
On Thursday 30 July 2009 01:51:52 am DJ Mangus wrote: Quite a few errors there, first off you are naming the function, you cannot do that if you are using a function literal. Secondly for Effect.Appear you are probably best off using it directly on the DOM element after it's been extended

[Proto-Scripty] Re: License question

2009-07-30 Thread jdetaeye
I am faced with the same question as the initial author. The file prototype.js has the following text in the header: Prototype is freely distributable under the terms of an MIT-style license. IANAL (I am not a lawyer) but what does MIT-style mean? Is it in any way different from a strict

[Proto-Scripty] Any javascript included in document loaded in div with Updater isn't recognized

2009-07-30 Thread DJJQ
Hello. I use the Updater function to load a div on the page with contents from a php file. The load works just fine, however in the browser I have noticed that new javascript written in the new php isn't recognized. However javascript code from the original page is recognized in the new div. I

[Proto-Scripty] Re: Any javascript included in document loaded in div with Updater isn't recognized

2009-07-30 Thread T.J. Crowder
Hi, You're looking for the evalScripts option of Ajax.Updater[1], which in turn uses Element#update[2] to update the target container, which in turn (!) uses String#evalScripts[3] to eval the scripts. Scripts must be inline in script tags, they cannot have src attributes loading external

[Proto-Scripty] Re: Using a prototype function in dynamic content.

2009-07-30 Thread Drum
Ok, thanks. I think I understand the reasoning here, but I can't get my actual example to work. This is the script as it appears in the initially loaded page and also as it is in the html snippets bought in by ajax. div id=kwdisp0101some keyword/div script if(editor0101){ editor0101.dispose();

[Proto-Scripty] Re: Using a prototype function in dynamic content.

2009-07-30 Thread T.J. Crowder
Hi, Really close. :-) But you're running afoul of how eval handles the var statement. (If you'd just left the var statement out entirely, it probably would have worked thanks to the horror of implicit globals [1], but you'd be cluttering up the window namespace something fierce.) Also,

[Proto-Scripty] Re: ternary operators

2009-07-30 Thread Rick Waldron
Huh? Jeztah == Alex? On Thu, Jul 30, 2009 at 8:37 AM, Alex McAuley webmas...@thecarmarketplace.com wrote: Sorry you missed the point i was trying to achieve. I wanted the operator to in essence evaluate 2 responses for example. alert('Element Does not exist'); alert('The second

[Proto-Scripty] Re: ternary operators

2009-07-30 Thread Alex McAuley
the original post is signed with my name !! Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Rick Waldron To: prototype-scriptaculous@googlegroups.com Sent: Thursday, July 30, 2009 7:31 PM Subject: [Proto-Scripty] Re: ternary operators Huh? Jeztah

[Proto-Scripty] Re: ternary operators

2009-07-30 Thread Rick Waldron
Hehe. I guess i missed that. I read through these pretty quickly... On Thu, Jul 30, 2009 at 2:35 PM, Alex McAuley webmas...@thecarmarketplace.com wrote: the original post is signed with my name !! Alex Mcauley http://www.thevacancymarket.com - Original Message - *From:* Rick

[Proto-Scripty] Re: ternary operators

2009-07-30 Thread Alex McAuley
Me too !!! Alex Mcauley http://www.thevacancymarket.com - Original Message - From: Rick Waldron To: prototype-scriptaculous@googlegroups.com Sent: Thursday, July 30, 2009 7:39 PM Subject: [Proto-Scripty] Re: ternary operators Hehe. I guess i missed that. I read

[Proto-Scripty] Re: Event onDrop on Sortable class

2009-07-30 Thread Christophe
Yeah... But I am using a sortable... What do you mean ? Cheers, Christophe On Jul 30, 12:25 pm, Alex McAuley webmas...@thecarmarketplace.com wrote: There is some options in draggable onEnd: function() {} HTH Alex Mcauleyhttp://www.thevacancymarket.com - Original Message -

[Proto-Scripty] Re: ternary operators

2009-07-30 Thread T.J. Crowder
Hi Alex, However it cannot be achieved so it must be done usung if/else.. Well, this is JavaScript, there's almost always a way. I can think of four off the top of my head that keep it in a single expression -- but all of them are much worse (most of them much, much, much worse) than using an

[Proto-Scripty] Escaping Input

2009-07-30 Thread infringer
I have a form, I've been doing this in javascript: entry = $('busCalForm').serialize(true); entry = JSON.stringify(entry); new Ajax.Request(modules/buscal/processes/saveBooking.php, { parameters: year= + year + recnum= + busmstr_id + json= + entry, onSuccess:

[Proto-Scripty] Re: ternary operators

2009-07-30 Thread Alex McAuley
thanks TJ, The alert() was just an example - perhaps a bad one! ... i did not however consider the || version. Regards Alex Mcauley http://www.thevacancymarket.com - Original Message - From: T.J. Crowder t...@crowdersoftware.com To: Prototype script.aculo.us

[Proto-Scripty] Re: Escaping Input

2009-07-30 Thread T.J. Crowder
Hi, You're sending an unencoded string (which happens to be in JSON format) as part of your parameters string, which is meant to be URL- encoded data. A # sign is the least of your problems. ;-) You'll want to encode that with JavaScript's encodeURIComponent function[1]. Somewhat OT, but as

[Proto-Scripty] Re: Escaping Input

2009-07-30 Thread T.J. Crowder
Sorry, I got my wires crossed half-way through the first one of those. You can't use String#toJSON, it's not a string! Doh. Correcting my first example: entry = encodeURIComponent(Object.toJSON($('busCalForm').serialize (true))); new Ajax.Request( modules/buscal/processes/saveBooking.php,

[Proto-Scripty] Newbee question : Compatibility with javascript 1.5

2009-07-30 Thread Christophe
Hi there, Apologies to everybody if my question is offending in any way, but this is my first post to such a group. I'm a occasional user of Prototype and Scriptaculous and pretty happy with these tools. However, I'm facing an issue for which I can find any answer around: I created some pages

[Proto-Scripty] Re: $F() cannot get radio button values?

2009-07-30 Thread mr_justin
The value is returned from radio buttons and checkboxes if the item is checked/selected. This behavior mimics browser behavior when these fields are submitted via a traditional form submit. If $F() returns null for a checkbox or radio button, then that item is not selected and it's value should

[Proto-Scripty] Re: Newbee question : Compatibility with javascript 1.5

2009-07-30 Thread Rick Waldron
That sounds like fun... i like device app development. Can you tell us what device you're working with? That will be helpful Rick On Thu, Jul 30, 2009 at 3:55 PM, Christophe christophe.dec...@gmail.comwrote: Hi there, Apologies to everybody if my question is offending in any way, but this

[Proto-Scripty] Re: $F() cannot get radio button values?

2009-07-30 Thread Walter Lee Davis
I suspect you probably want to get the radio *group* by name, and then see which (if any) of its members is currently checked. $$('input[name=yourRadioGroup]:checked').first() will get the element or false. To explicitly get the value, try this: var myValue =

[Proto-Scripty] Re: how sum value from input?

2009-07-30 Thread Miguel Beltran R.
Thanks for the advice. 2009/7/29 T.J. Crowder t...@crowdersoftware.com Hi, That version seems okay, except it parses the number twice (first for isNaN, then again in parseFloat). There's also no need to check for a blank string, '' can't be converted to a number and so parsing it will

[Proto-Scripty] Re: Using a prototype function in dynamic content.

2009-07-30 Thread Drum
Sorry, but it's still not working for me. I have my main page as it initially loads with this in the HEAD script language=javascript type=text/javascript var ipeManager = { editors: {}, addOrReplaceEditor: function(id, url, size, paramstr){ var eds; eds = this.editors;

[Proto-Scripty] What object is it exactly that's passed to the Ajax.Request onSuccess callback?

2009-07-30 Thread David Karr
I've briefly surveyed the documentation, and I really can't figure out exactly what object is passed to the onSuccess callback of the Ajax.Request() method. I've read one statement that says it's the XMLHttpRequest object, so they called the parameter request, which seems very odd for an Ajax

[Proto-Scripty] Re: What object is it exactly that's passed to the Ajax.Request onSuccess callback?

2009-07-30 Thread T.J. Crowder
Hi, Yes, those docs are messed up (out of date, I think, and will be fixed by the new documentation stuff in 1.6.1). It's an Ajax.Response[1]. [1] http://prototypejs.org/api/ajax/response HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services

[Proto-Scripty] Re: ternary operators

2009-07-30 Thread T.J. Crowder
Hi, I thought that too, but tried it and it didn't work, so I figured I had to be misremembering. Turns out I just messed up my test. :-) -- T.J. On Jul 31, 5:49 am, kangax kan...@gmail.com wrote: On Jul 30, 3:26 pm, T.J. Crowder t...@crowdersoftware.com wrote: Hi Alex, However it