RE: [Rails-spinoffs] XML Question

2006-07-28 Thread Hill, Greg
Title: Message Is Prototype’s inspect function recursive?  If it is, then $H(results).inspect() would work.  Otherwise, you’ll have to come up with your own recursive function.   Greg   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sam Sent: Friday, July 28, 2

RE: [Rails-spinoffs] XML Question

2006-07-28 Thread Sam
Title: Message Greg,   OK, there's objects in objects.  Nice...   For debugging purposes, what's the simplest way to convert the entire returned object to a string for inspection?   Sam -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hil

RE: [Rails-spinoffs] XML Question

2006-07-28 Thread Hill, Greg
Title: Message Well, I’m sure xPath is a lot more flexible, but holy crap is that a lot of code.  As I said, mine is limited, but serves my purposes very well.  And it’s generic enough for anyone to use, although it only handles node types 1 to 3.  Anything beyond that will be ignored (or p

RE: [Rails-spinoffs] XML Question

2006-07-28 Thread Sam
Title: Message Thanks (a lot! ).  I've had to rule out including a 100Kb xPath.js library.  Maybe this lib is a better solution.   I diagnosed the problem with IE responseXML - if the file isn't served "up" as text/xml, IE doesn't make responseXML available.  (I was testing on my local hard

RE: [Rails-spinoffs] XML Question

2006-07-28 Thread Hill, Greg
Title: Message No, it’s available.  You might have to say responseXML.documentElement (not sure, but I always do and it works).  Oh, and you could try changing ‘get’ to ‘post’.  I’ve always had moderate to bad success in IE with ‘GET’ requests on Ajax.  Even with no arguments, sometimes IE

RE: [Rails-spinoffs] XML Question

2006-07-28 Thread Sam
Title: Message   ... is the responseXML below available only in Mozilla?  I get nada in IE.   Sam -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kjell BublitzSent: Monday, July 24, 2006 4:19 PMTo: rails-spinoffs@lists.rubyonrails.orgS

Re: [Rails-spinoffs] Extending Class.create() for casting objects

2006-07-28 Thread Jay Miller
It seems to me that attempting to enforce types to catch programming errors misses a bit of the point of _javascript_.  I suppose it would make certain methods of debugging simpler at the cost of greater code complexity, but that benefit seems to be less than overwhelming to me. Perhaps it's relate

RE: [Rails-spinoffs] Extending Class.create() for casting objects

2006-07-28 Thread Hill, Greg
> Yes, it is used to catch programming errors by introducing a little type > safety. How many times have you written this in your project: > > function showMenu(obj) { > if(obj instanceof MenuItem) { > obj.getNode().style.visibility = "visible"; > } else throw new Error("Invalid parameter!

RE: [Rails-spinoffs] Extending Class.create() for casting objects

2006-07-28 Thread Em Te
Yes, it is used to catch programming errors by introducing a little type safety. How many times have you written this in your project: function showMenu(obj) { if(obj instanceof MenuItem) { obj.getNode().style.visibility = "visible"; } else throw new Error("Invalid parameter!"); } Now you

Re: [Rails-spinoffs] Autocomplete feature for textarea (for entering multiple email addresses)

2006-07-28 Thread Geo
Yes, just use a tag instead.