[Proto-Scripty] Re: HTML Entity Handling with setValue

2009-03-18 Thread P. Douglas Reeder
When will documentation on Form.Element.setValue() be added to http://prototypejs.org/api/form/element ? 4) Prototype way of doing it:     $(textArea).setValue(content.unescapeHTML()); --~--~-~--~~~---~--~~ You received this message because you are subscribed

[Proto-Scripty] Re: Client-side File Processing

2009-04-14 Thread P. Douglas Reeder
I created the following HTML file to test your function and get the following errors: 1) The file input element returns only the file's name, so I don't see how your function could load the file in. 2) Under Safari 3 and later, I get a TypeError: Result of expression 'xmlDoc.load' [undefined]

[Proto-Scripty] Re: Recommended and Disrecommended DOM Methods

2009-04-19 Thread P. Douglas Reeder
I suppose compiling a list would be a useful exercise, and I can post it on the wiki for other newbies. On Apr 18, 5:56 am, T.J. Crowder t...@crowdersoftware.com wrote: Hi, I don't think there's a list quite like what you're asking about, no, but if you have a read through the API docs[1]

[Proto-Scripty] Re: Changing href in onclick function

2009-05-20 Thread P. Douglas Reeder
To put what RobG said concretely, why can't you use: $('ph').observe('click', function(event) { if($('ph').href.endsWith('#')) { event.preventDefault(); new Ajax.Request(geturl.php, {

[Proto-Scripty] Re: Adding properties to native objects

2009-05-20 Thread P. Douglas Reeder
You may want to use Crockford's factory pattern, rather than using any sort of constructor: function specialDateFactory() { var that = new Date(); that.isEaster = function () {return ...}, that.isLaborDay = function () {return ...}, return that; } You can get more

[Proto-Scripty] Re: Adding properties to native objects

2009-05-21 Thread P. Douglas Reeder
T.J. is correct, of course, that my original suggestion would make multiple copies of the functions. That's what I get for writing off the top of my head. If I understand correctly, what joe t. really want is something like: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN

[Proto-Scripty] Clarification on PUT method in Ajax.Request

2009-06-17 Thread P. Douglas Reeder
The documentation on Ajax.Request, for the method option, says: method 'post' The HTTP method to use for the request. The other widespread possibility is 'get'. As a Ruby On Rails special, Prototype also reacts to other verbs (such as 'put' and 'delete' by actually using