[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-24 Thread Vinay Seshadri
Hi Walter, Ill do that. It might take a little time though. Half a day? Also, in the meanwhile, im using toggle.slide elsewhere in the app but im using RJS there and not pure JS. That is giving me the same problem. I thought ill post that code too in case it helps.. so here it is.. the main html

[Proto-Scripty] Prototype library for Firefox extensions

2009-04-24 Thread Saumil Mehta
Does anyone know if there is a PrototypeJS library that is compatible with Firefox Extensions? I have written a bookmarklet (which we're converting to a FF addon) which references 700 lines of Prototype- based code and do not want to refactor it using JQuery. I've heard of Prototype XUL, but it

[Proto-Scripty] Re: Event Observers and Question on Copying Form Values Using Prototype

2009-04-24 Thread katz
Walter Lee Davis wrote: On Apr 24, 2009, at 1:38 AM, katz wrote: On Event observers, I just realized it wasn't working because the html was only inserted upon calling Add new item variation. So it would definitely fail regardless of whether document.observe('dom:loaded',function() or

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-24 Thread Vinay Seshadri
Hi Walter, Ive put up my code here http://jsbin.com/ucebi. The funny part is, its working there. im not able to replicate the behaviour i get at my end. http://jsbin.com/ucebi/edit should show u the code. Do take a look. Thanks! On Fri, Apr 24, 2009 at 12:24 PM, Vinay Seshadri

[Proto-Scripty] Re: trouble with afterFinish callback

2009-04-24 Thread T.J. Crowder
Hi, You've supplied two separate options objects to Efect.toggle, one containing the duration and a separate one containing the callback. Aren't they supposed to be in the same options object? Separately: Why use an old-fashioned DOM0 inline handler? Instead: script type=text/javascript var

[Proto-Scripty] Robert Penner's easing equations for Scriptaculous 1.8

2009-04-24 Thread Riccardo De Agostini
Just thought this might be of interest to someone else. Comments and optimizations are welcome. //snipsnipsnipsnip- // == // Robert Penner's easing functions v2.0

[Proto-Scripty] trouble with afterFinish callback

2009-04-24 Thread aikon
i just try to call aan action on afterFinish callback but it doesn't works ... this is my code .. : script type=text/javascript var mycallback = function() { alert('it works!'); }; /script div id=intbarr_closed1 class=intbarr_closed div class=intbarr_txt id=bar1 onClick=Effect.toggle

[Proto-Scripty] Re: Robert Penner's easing equations for Scriptaculous 1.8

2009-04-24 Thread Henry
On Apr 24, 10:37 am, Riccardo De Agostini wrote: snip function Sine_easeIn(t) { return -1 * Math.cos(t * (Math.PI / 2)) + 1; } It is an underappreciated characteristic of ECMAScript that the language does not contain such a thing as a negative numeric literal. Instead

[Proto-Scripty] Re: the effect in Effect.toggle does not work

2009-04-24 Thread Walter Lee Davis
diff yours against this one: http://jsbin.com/abufa/edit Your HTML wasn't valid at all, there are tags opening and closing out of order, and all of your comments have the same ID. I am not sure if this tells you anything you didn't know, it can be hard to work in an abstraction and fix

[Proto-Scripty] Re: International Characters with Ajax.autocompleter

2009-04-24 Thread Diodeus
I was under the impression that encoding: set the request encoding, not the response. Yup, I'm sending out the 1252 header but I'm still getting broken accented characters. I'd like to make it UTF-8 all the way, but the client's data was written using Word and is already in the database. : ( On

[Proto-Scripty] Re: International Characters with Ajax.autocompleter

2009-04-24 Thread Walter Lee Davis
That's why I recommend you look at taking the output from the database, passing it through iconv on the server to transcode it from 1252 to UTF-8, and then serving it as UTF-8, which the browser will love you for. This is desperately easy in PHP, probably equally so in Perl. $string =

[Proto-Scripty] remove function and .class

2009-04-24 Thread clicforw...@googlemail.com
Hello, i need a function witch removes an selector and his elements inside. It works well with id like this: $('mutsu').remove(); but it wont work with class name. I tried: $$('.className').remove(); and document.getElementByClassName('className').remove(); It return always: $('.className')

[Proto-Scripty] Re: International Characters with Ajax.autocompleter

2009-04-24 Thread Walter Lee Davis
Are you sending the header on the main page as well as the snippet you're returning via Ajax? If there's a mismatch between the main body of the page and the replacement code, that could be another issue. Look in Firebug at the headers from your initial request for the page (click on Net,

[Proto-Scripty] Re: remove function and .class

2009-04-24 Thread T.J. Crowder
Hi, but it wont work with class name. Well, let's think about what you're doing. You're using $$(), and then calling a remove() method on what it returns. According to the $$ () docs[1], it returns an array. So unless arrays have a remove() method (I don't think they do), that's not going

[Proto-Scripty] Re: remove function and .class

2009-04-24 Thread Walter Lee Davis
HTML className is not spec'd to be page-unique, so there is no such concept as get the one element with this className. The DOM function is document.getElements.ByClassName (note the plural), and returns an array -- even if there's just one such on the page. Likewise the Prototype

[Proto-Scripty] Re: remove function and .class

2009-04-24 Thread clicforw...@googlemail.com
Thank for this, i tried this: $$('#nav ul.level0').invoke('remove'); and $$('ul.level0').invoke('remove'); but both are doing nothing. Maybe its better i explain what i want to do: I have a Magento Shop with a large Subkategorie Navigation. In some cases i dont need to display this subkategorie

[Proto-Scripty] Re: International Characters with Ajax.autocompleter

2009-04-24 Thread Per Kofod
I did some more work on it, found out that the database is actually using ISO-8859-1 character set, and changing the header, I send from perl, actually made the characters show correctly in the browser when received by the server. on the client to server side, I tried changing the encoding option

[Proto-Scripty] Re: remove function and .class

2009-04-24 Thread Walter Lee Davis
Anything that Prototype can do will leave the code in place in your HTML. If you want to remove these options from your served code, you will have to do that on the server using PHP or Ruby or another scripting language. Search engines don't run JavaScript anyway, so this function would

[Proto-Scripty] Re: remove function and .class

2009-04-24 Thread clicforw...@googlemail.com
thanks for this fast and great support! On 24 Apr., 17:12, Walter Lee Davis wa...@wdstudio.com wrote: Anything that Prototype can do will leave the code in place in your   HTML. If you want to remove these options from your served code, you   will have to do that on the server using PHP or

[Proto-Scripty] HTML breaks JSON

2009-04-24 Thread Matt
Hi there, I'm using PHP to output some JSON through AJAX to my page. It breaks whenever I use a backslash or quote mark. I've tried using php's json_encode function which doesn't seem to help, just breaks it further. I've also tried php's addslashes() to the output, again, same problem. Am I

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

2009-04-24 Thread Miguel Beltran R.
Hi list Here in my job the system use MS Sql Server 2000 what not have support utf-8, so I need work with ISO-8859-1. Using Ajax this send the parameters with encoding utf-8, after read a lots post I tried with the options modifica: function(evt){ evt.stop(); console.log(estro a

[Proto-Scripty] Re: HTML breaks JSON

2009-04-24 Thread T.J. Crowder
@Ananth: Converting to Base64 would be massive overkill, surely. @OP: There's no reason you can't include strings containing HTML in JSON data. You just have to make sure your strings are valid string literals, like this: { message: pThis is HTML./p } There's nothing special other than

[Proto-Scripty] Re: HTML breaks JSON

2009-04-24 Thread Ananth Raghuraman
JSON should not contain HTML for tactical/ease of programming purposes unless the HTML is there as part of a larger design, but there may or may not be implementation restrictions. If you are facing problems, can you try encoding the HTML string (Base64) and decoding back (using Javascript Base64

[Proto-Scripty] convert string to a number

2009-04-24 Thread Ananth Raghuraman
Need prototype function to convert object/string/number to number. Please help. --~--~-~--~~~---~--~~ 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

[Proto-Scripty] Event Supressing

2009-04-24 Thread ferion
Hello Everybody, another Problem with my project. Our customer wants widgets without scrollbars. But the content of a widget might be larger than the display area of the widget itself. So we have to build ugly up and down Arrows which are scrolling the content. This works fine. In addition I

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

2009-04-24 Thread Miguel Beltran R.
2009/4/24 Miguel Beltran R. yourpa...@gmail.com Hi list Here in my job the system use MS Sql Server 2000 what not have support utf-8, so I need work with ISO-8859-1. Using Ajax this send the parameters with encoding utf-8, after read a lots post I tried with the options modifica:

[Proto-Scripty] Re: convert string to a number

2009-04-24 Thread Hector Virgen
Can you use the native parseInt() function? or parseFloat()? var num = parseInt(52); console.log(num); // int 52 -Hector On Fri, Apr 24, 2009 at 9:06 AM, Ananth Raghuraman araghuram...@gmail.comwrote: Need prototype function to convert object/string/number to number. Please help.

[Proto-Scripty] Re: Event Supressing

2009-04-24 Thread Richard Quadling
2009/4/24 ferion fer...@gmx.de: Hello Everybody, another Problem with my project. Our customer wants widgets without scrollbars. But the content of a widget might be larger than the display area of the widget itself. So we have to build ugly up and down Arrows which are scrolling the

[Proto-Scripty] Re: Prototype: Ajax.PeriodicalUpdater keeps running after container is removed or changed

2009-04-24 Thread NonoX
T.J. If the div container doesn't change the stop method works fine, the issue is presented when the div container where the periodicalupdater is executing change... the periodicalupdater still working in background and never stop... the only way for stop that is reloading the page. I hope be

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

2009-04-24 Thread Miguel Beltran R.
2009/4/24 Miguel Beltran R. yourpa...@gmail.com 2009/4/24 Miguel Beltran R. yourpa...@gmail.com Hi list Here in my job the system use MS Sql Server 2000 what not have support utf-8, so I need work with ISO-8859-1. Using Ajax this send the parameters with encoding utf-8, after read a lots

[Proto-Scripty] Re: HTML breaks JSON

2009-04-24 Thread Matt Foster
What are you sending to PHP's json_encode? It is expecting a structure to serialize into a JSON syntax string. $struct = array(message = h1Hello World/h1Who says we can't have any kind of \quotes\ we want?); echo json_encode($struct); If you try to run json_encode on your already JSONified

[Proto-Scripty] Effect.Appear doesn't work when in queue

2009-04-24 Thread alpineedge3
Hi, I'm running an effect chain: move, shrink, then appear. The appear effect doesn't fade in. rather, it just becomes visible with 100% opacity. The scripts are controlling the barcode boxes on the homepage of www.fastpricecheck.com . Any help would be appreciated. Thanks!

[Proto-Scripty] Re: convert string to a number

2009-04-24 Thread RobG
On Apr 25, 2:06 am, Ananth Raghuraman araghuram...@gmail.com wrote: Need prototype function to convert object/string/number to number. Please help. Without a more concise specification for what the object/string/number might be, you will end up with a large function that works for a few

[Proto-Scripty] Re: convert string to a number

2009-04-24 Thread Ananth Raghuraman
Thanks for pointing me to the native functions! In the meantime I also found 1.8 has the Number object/function. I just did Number(mynumberstring) to convert mynumberstring to a number. I guess Number also accepts an object or another Number as argument.. On Sat, Apr 25, 2009 at 12:02 AM, RobG

[Proto-Scripty] Re: convert string to a number

2009-04-24 Thread pradeep
Dear Ananth, you can also use.. Math.abs(string); to get the number which is one of the prototypes method. However, the beauty of the javascript is that it automatically typecaste's the varible declared to number or string.. depending on the usage .. could you tell me , where