[Proto-Scripty] unable to evaluate javascript in Ajax.Request response

2008-11-07 Thread jonathon
Hello, I'm having difficulty getting something to work. Perhaps someone will know the solution? The function: new Ajax.Request('test.php', { evalScripts: true, onSuccess: function(transport) { $('canvas').innerHTML = transport.responseText; }, onFailure: function() {

[Proto-Scripty] Re: Action on innerHTML and bindAsEventListener doesn't work anymore

2008-11-07 Thread T.J. Crowder
Hi Rob, I don't think there's any need to remove then insert, you can just insert the node in the new location. Thanks! You're right (of course!), it's right there in the spec from day 1: http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#method-insertBefore and the function becomes:

[Proto-Scripty] Re: unable to evaluate javascript in Ajax.Request response

2008-11-07 Thread Alex Mcauley
Hi Jonathon .. You are giving the request the wrong parameter ... You dont need to set a header of text/javascript either evalJS : true, making your script new Ajax.Request('test.php', { evalJS: true, // - notice evalJS not evalScripts onSuccess: function(transport) {

[Proto-Scripty] Re: Building a lazy Loader

2008-11-07 Thread T.J. Crowder
...you'll get far more benefit from ensuring your code is concise, then budling it into as few source files as reasonable (say one or two) and using the same script files throughout your site so the browser can use cached stuff where possible...zip your source files and let the browser deal

[Proto-Scripty] Reinitialize lib after ajax.request

2008-11-07 Thread Michael
Hello, i am having a pretty basic problem, i think. In a website i have an ajax menu which loads new content in a container. Some of these containers use prototype based libraries (e.g. lightwindow,jsvalidate). Since these libraries initialize their elements onload, the new elements are not

[Proto-Scripty] Ajax.Request add a toString method

2008-11-07 Thread jaap.taal
I'd like a toString method for an Ajax.Request object that can identify the request for logging purposes. Right now I'm using the following custom code: Ajax.Request.prototype.toString = function() { if (this.method == 'get') { return this.url + (GET); } else { return

[Proto-Scripty] Re: Ajax.Request and text/javascript = syntax errors in javascript

2008-11-07 Thread T.J. Crowder
Hi, You're looking for the onException callback[1]. If an exception occurs during script evaluation (or for any other reason during the processing of the request), onException is called. You might want to check ou the Bulletproof Ajax Requests How To in the unofficial wiki[2], although what's

[Proto-Scripty] Re: Simple $( ) question

2008-11-07 Thread Scott
Thanks everyone. Very helpful. I also like the Prototype 'stripTags()' method. Very useful! On Nov 6, 3:55 am, T.J. Crowder [EMAIL PROTECTED] wrote: Hi, Should I be able to say the following?   var total = parseFloat($('foo')); No, $() gives you -- as you discovered -- a reference

[Proto-Scripty] Re: IE6 -- No change of cursor while moving an image

2008-11-07 Thread Fernando
Hi! At the body tag I put the onload event to start my javascript. The page loads and then it's started the banner animation, with this command: document.getElementById(idContainer).style.backgroundPosition = 0px + auxImgPosVertical + px; The idContainer is a span element with a background

[Proto-Scripty] Re: testing whether all elements in a div have a certain class

2008-11-07 Thread Matt Andrews
Can anyone help? I'm really close to solving this, I just need someone with a better grasp of Javascript to prod me in the right direction... On Nov 3, 9:51 am, Matt [EMAIL PROTECTED] wrote: On Nov 1, 4:38 pm, Jarkko Laine [EMAIL PROTECTED] wrote: 1) your alerting with a string bar there.

[Proto-Scripty] Re: testing whether all elements in a div have a certain class

2008-11-07 Thread Alex Mcauley
okay i am trying to get this correct .. You want to see if a certain amount of spans in an element have a class name of 'complete' and if so do something else firstly you can easily count the amount with $$ var $complete=$$('.complete').length then you want to do something if they are more

[Proto-Scripty] Re: Drag and Drop with overflow auto

2008-11-07 Thread Haraldo
Hi there, I have the same issue: var value = element.style[style]; Firefox 3 happens to register it as follows ( similar error in ie7 ): element is null line: 1903 Has anyone worked out what's going on here. I know it seems to affect the draggable items. My code is not affected at all. The

[Proto-Scripty] Re: Ajax.Request add a toString method

2008-11-07 Thread T.J. Crowder
FWIW, although I think it's a neat idea, I don't think I'd want to see it in Prototype itself. I think it's more of a debugging thing. (Granted Prototype has some other debugging things; I'd like to strip those out of the release version as well...) -- T.J. Crowder tj / crowder software / com

[Proto-Scripty] Trying to get drag 'n drop to work... lost and confused.

2008-11-07 Thread tman
I am trying to get drag 'n drop functionality using scriptaculous library but it is not working as I expected so I need to get some help on how I am supposed to use this library correctly. Basically I have a page where I have a list of people and I want to be able to drag n drop them into areas

[Proto-Scripty] Addition

2008-11-07 Thread Robert
Skimming through the code, I've found several errors that occurred while stripping the code from my actual project. Therefore, and to actually see the problem, I uploaded a test case to http://sp00n.pytalhost.com/dragtest/index.htm --~--~-~--~~~---~--~~ You

[Proto-Scripty] Re: Ajax.Request add a toString method

2008-11-07 Thread kangax
On Nov 7, 9:08 am, jaap.taal [EMAIL PROTECTED] wrote: I'd like a toString method for an Ajax.Request object that can identify the request for logging purposes. Right now I'm using the following custom code: Ajax.Request.prototype.toString = function() {     if (this.method == 'get') { And

[Proto-Scripty] Re: unable to evaluate javascript in Ajax.Request response

2008-11-07 Thread Jonathon Deason
Alex, I hit submit too early, I removed most of the real code to get it out of the way and accidentally changed it before I was allowed to post again! evalJS was not functioning either. TJ, But! If you do want to use Ajax.Request, you can just use Element.update[6] in your onSuccess handler

[Proto-Scripty] Re: Ajax.Request and text/javascript = syntax errors in javascript

2008-11-07 Thread jaap.taal
That's not what I want. I want to serve text/javascript but when I'm using a dynamically generated script which contains syntax errors I'm not notified by Prototype. On Nov 6, 8:57 pm, Diodeus [EMAIL PROTECTED] wrote: Serve it as text/html. On Nov 6, 2:06 pm, jaap.taal [EMAIL PROTECTED]

[Proto-Scripty] JSON and elements / text nodes

2008-11-07 Thread Hector Virgen
Hello, Is it possible to convert elements / text nodes to JSON using Object.toJSON()? I need them in JSON so I can store them in a cookie for the cookiejar class I am creating. sample code: var element = new Element('div'); var nativeelement = document.createElement('div'); var textnode =

[Proto-Scripty] Re: JSON and elements / text nodes

2008-11-07 Thread kangax
On Nov 7, 2:19 pm, Hector Virgen [EMAIL PROTECTED] wrote: Hello, Is it possible to convert elements / text nodes to JSON using Object.toJSON()? I need them in JSON so I can store them in a cookie for the cookiejar class I am creating. sample code: var element = new Element('div'); var

[Proto-Scripty] Re: JSON and elements / text nodes

2008-11-07 Thread Hector Virgen
Thanks, Kangax. I think that helps answer my question. I was hoping my cookiejar class would be able to store *any* JS object in the client cookie, but now I realize that it's not easy and probably unneccessary. -Hector On Fri, Nov 7, 2008 at 11:50 AM, kangax [EMAIL PROTECTED] wrote: On Nov

[Proto-Scripty] Re: Webservice with Ruby

2008-11-07 Thread T.J. Crowder
Hi, This group is for Prototype script.aculo.us, not Ruby. I'd suggest posting somewhere Ruby-related: http://www.ruby-lang.org/en/community/ HTH, -- T.J. Crowder tj / crowder software / com On Nov 7, 5:24 pm, Kittu [EMAIL PROTECTED] wrote: Right now we are using java based webservices and

[Proto-Scripty] Re: Re-create the Apple Startpage list?

2008-11-07 Thread iluvthsgam
Does anybody have any insight to this ? Or where maybe to start looking ? --~--~-~--~~~---~--~~ 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] Re: Re-create the Apple Startpage list?

2008-11-07 Thread Brian Williams
well, basically there is a periodical updater, it appears to get reset if the user clicks on one of the links. the server returns an entire html page when the AJAX call is performed. there also seems to be a fast fade type of transition. if this is your first AJAX attempt of this nature i would

[Proto-Scripty] Re: passing parameter

2008-11-07 Thread vtsuper
Dear all, any new ideas about this question Victor On 11月7日, 上午12時53分, vtsuper [EMAIL PROTECTED] wrote: yes...this is my question Or are you asking which style to use when you're defining your own functions and classes? Both ways should be doing the same things...but what I want to

[Proto-Scripty] Re: passing parameter

2008-11-07 Thread vtsuper
here are the third style var test = new Frm('frm1',{method:'post',url:'testing.php'}); var test = new Frm('frm1','post','testing.php'); var test = new Frm({id:'frm1',method:'post',url:'testing.php'}); which style that the prototypejs developer suggest us to use?? On 11月8日, 上午10時53分, vtsuper