[Rails-spinoffs] Re: prototype

2007-08-31 Thread dave
to the element before. Or is possible to get references to all handlers for an element? On 31 Srp, 11:49, [EMAIL PROTECTED] wrote: http://www.prototypejs.org/api/event/stopObserving 2007/8/31, dave [EMAIL PROTECTED]: Hi, is there some way to remove all event listeners for the specific

[Rails-spinoffs] Re: prototype.js hangs page load when included in an HTML page

2008-02-21 Thread Dave
html xmlns=http://www.w3.org/1999/xhtml; head link rel=stylesheet type=text/css href=skins/bpath/ style.css media=screen / script src=js/prototype.js type=text/javascript/script script src=js/navigation.js type=text/javascript/script script src=js/widgetSupport1.0.js

[Rails-spinoffs] prototype.js hangs page load when included in an HTML page

2008-02-21 Thread Dave
I have a simple HTML page - stripped everything possible from it. No javascript is invoked (e.g. body onLoad) when the page is loaded I've included the new prototype.1.6.0 (and tried 1.6.0.2) in my html page. When I load the page - the browser will render the html content - but the page continues

[Rails-spinoffs] Re: prototype.js hangs page load when included in an HTML page

2008-02-22 Thread Dave
They are my own.. I should have cleaned up the source some more to exhibit... If I only include prototype.js - I experience the problem, including/excluding my scripts doesn't appear to have an impact. --~--~-~--~~~---~--~~ You received this message because you

[Rails-spinoffs] Re: prototype.js hangs page load when included in an HTML page

2008-02-22 Thread Dave
IE 7.0.x, WinXP I can't replicate in Firefox or Safari It doesn't happen all the time either - maybe 1 in 20 hits... sorry I should have mentioned that. Sorry - I can't supply a URL - it's internal. --~--~-~--~~~---~--~~ You received this message because you

[Rails-spinoffs] Prototype onMouseOver

2008-03-03 Thread dave
after creating an element how can I add a onMouseOver ? var mydiv = document.createElement('div'); mydiv.innerHTML = foo; mydiv.onMouseOver = color=red; is this only done via 'observe' thankyouverymuch --~--~-~--~~~---~--~~ You received this message because

[Rails-spinoffs] events within classes - what am i doing wrong?

2008-03-24 Thread dave
Hello All, I'm trying to make a class that I store a HTML Element in, and add a mouseDown event into it. However the function that grabs the mouse down event doesn't know the element that is being received during the class init... This probably makes no sense, so i've put a basic example here.

[Rails-spinoffs] Re: events within classes - what am i doing wrong?

2008-03-24 Thread dave
excellent. and good description too. Thank you so much dan!! On Mar 24, 5:14 pm, Dan Dorman [EMAIL PROTECTED] wrote: On Mon, Mar 24, 2008 at 5:49 PM, dave [EMAIL PROTECTED] wrote: The mousedown event is created as well. Now Click in the blue box... the event is received, but the class

[Rails-spinoffs] Re: X/Y-position of an element after dragging with scriptacolous

2007-01-17 Thread Dave Crane
On Tuesday 16 January 2007 23:47, Daniel Haller wrote: Hi Dave, thanks for your help - from the Author of Ajax in Action in person. Your book is on my Amazon Wishlist for weeks, really... I'm really impressed :-) shucks, you'll make me blush... But your example brings me to a quite

[Rails-spinoffs] Re: Insertion irregularities

2007-01-18 Thread Dave Crane
options property, and the add() method to add a new option object, something like: var sel=$(TestSelect); sel.add(new Option(apple,1)); This are DOM 1 standard stuff, supported in all browsers AFAIK. HTH Dave -- Author Ajax in Action http://manning.com/crane Ajax

[Rails-spinoffs] Re: Retrieving a specific div or class with Updater

2007-01-22 Thread Dave Crane
rather verbose to set up - URLs, recipient DOM nodes, etc. all need to be explicitly registered - but once it's set up, it's pretty useful. Dave -- -- Author Ajax in Action http://manning.com/crane Ajax in Practice http://manning.com/crane2 Prototype Scriptaculous Quickly

[Rails-spinoffs] Re: Retrieving a specific div or class with Updater

2007-01-22 Thread Dave Crane
of the page that you want to consume on the server. It's unusual for an ajax app to make requests to URLs that serve complete HTML pages. Usually, you'd write specific URLs for the ajax calls that contain only fragments of HTML content, or even data encoded as JSON or XML, or whatever. HTH Dave

[Rails-spinoffs] Re: About X-JSON header and evil things... ;)

2007-01-22 Thread Dave Crane
like a good suggestion to me. Just my $0.02 Dave -- -- Author Ajax in Action http://manning.com/crane Ajax in Practice http://manning.com/crane2 Prototype Scriptaculous Quickly http://manning.com/crane3 --~--~-~--~~~---~--~~ You received

[Rails-spinoffs] Re: About X-JSON header and evil things... ;)

2007-01-22 Thread Dave Crane
, and sessions, if you look at what HTTP was originally designed to do. Dave -- -- Author Ajax in Action http://manning.com/crane Ajax in Practice http://manning.com/crane2 Prototype Scriptaculous Quickly http://manning.com/crane3

[Rails-spinoffs] Re: Sortable cart?

2007-01-23 Thread Dave Crane
this? Is it already in the 1.7 release, which I haven't had a chance to look at yet?! Cheers, Dave -- -- Author Ajax in Action http://manning.com/crane Ajax in Practice http://manning.com/crane2 Prototype Scriptaculous Quickly http://manning.com/crane3

[Rails-spinoffs] Re: Resize Draggable div

2007-02-15 Thread Dave Crane
On Thursday 15 February 2007 14:59, Colin Mollenhour wrote: Dave, I've read the code for this class extensively. In fact, I am in the process of rewriting it to improve speed, memory cleanup, standards compliance, event hooks, compactness, Prototypishness, etc.. It is a pretty hefty library

[Rails-spinoffs] Re: Incremental Updates

2007-02-15 Thread Dave Crane
infrastructure for the piggy-backing approach. Dave On Thursday 15 February 2007 18:03, Ryan Gahl wrote: Short of using comet (google for cometd for an explanation), this is a manual type of thing... 1. Initial request goes to server, server responds starting step 1 2. Client gets message

[Rails-spinoffs] Re: Debugging with Visual Studio 2005

2007-02-15 Thread Dave Crane
anything I'm doing works in Firefox too, even if it's intended for an IE-only audience, and debug all the general issues in Firebug and then switch over to IE to catch the last 10% of IE-specific stuff. Dave On Thursday 15 February 2007 21:31, Grant wrote: Can somebody please assist me in figuring

[Rails-spinoffs] Re: Anybody knows of a Eclipse/NetBeans like UI Framework done with Scriptaculous?

2007-03-12 Thread Dave Crane
to have a look at qooxdoo (http://qooxdoo.org), which is an open source attempt at creating a desktop-app style of GUI toolkit inside a browser. Dave -- -- Author Ajax in Action http://manning.com/crane Ajax in Practice http://manning.com/crane2 Prototype Scriptaculous

[Rails-spinoffs] Re: simple JavaScript form/dropdown question

2007-03-22 Thread Dave Crane
the option I really wanted. Could be confusing to mis-select an element and then see the list go grey on you? Would the untrained user know to go twiddle sel2 in order to make sel1 work again? HTH Dave -- Author Ajax in Action http://manning.com/crane Ajax in Practice http

[Rails-spinoffs] Re: Ajax.request.responseArgs...

2007-03-23 Thread Dave Crane
context automatically. Dave Closures capture a reference to the variable. So it will always refer to the same variable. That's only usually a problem if your variable is in the global scope. If your var is scoped to a previous enclosing sub then it will be fine. -- -- Author

[Rails-spinoffs] Re: Problem with Ajax.Updater

2007-03-23 Thread Dave Crane
quirks at the moment (to put it politely!). If you can post a sample that shows the problem you're having, the list might be able to help. Regards, Dave Tim -- -- Author Ajax in Action http://manning.com/crane Ajax in Practice http://manning.com/crane2 Prototype

[Rails-spinoffs] Re: Problem with Ajax.Updater

2007-03-25 Thread Dave Crane
, but not if served straight off the filesystem. Mozilla was happy with the filesystem. I'm not sure why IE7 is being so fussy (IE6 didn't used to be), but in general, it's a good idea to use a web server anyway, even if serving up static content. There are plenty of free, lightweight ones around HTH Dave

[Rails-spinoffs] Re: effect.scrollto that not scoll at 100%

2007-03-27 Thread Dave Crane
On Tuesday 27 March 2007 14:03, Christophe Porteneuve wrote: Hey there, zio budda a écrit : 2007/3/26, Christophe Porteneuve [EMAIL PROTECTED]: zio budda a écrit : $(divOpen).setStyle({display:'block'}); $(divOpen).show() is nicer :-) uhhh... suggest for a good book ??? :) So

[Rails-spinoffs] Re: effect sequence

2007-03-29 Thread Dave Crane
Hi Peter, On Thursday 29 March 2007 07:15, Peter Lauri wrote: Is there any built in way in Scriptacuolus to put effects in sequences? Effect.Queue sounds like your man - doco is here: http://wiki.script.aculo.us/scriptaculous/show/EffectQueues HTH Dave -- -- Author

[Rails-spinoffs] Re: How2Do?settling Ajax pages' refreshing or bookmarking problem?

2007-03-29 Thread Dave Crane
that he says 'Safari is not supported'. Anyone know if Safari has generic issues with these techniques, or is it just that Mr. Neuberg doesn't have a Mac? Dave -- -- Author Ajax in Action http://manning.com/crane Ajax in Practice http://manning.com/crane2 Prototype

[Rails-spinoffs] Re: Basic guidance

2007-03-30 Thread Dave Crane
/observe Have fun! Dave On Friday 30 March 2007 15:32, EWonka wrote: Thanks Ryan, It's a fairly simple requirement actually, an ajax request will be sent to the application server and it will return data. The data will be comprised of a job description and id. I would like to take the data

[Rails-spinoffs] Scrolling Box Widget

2007-04-10 Thread Dave Grijalva
I cranked out a library for making prototype based (custom styled) scrollbars over the weekend. If anybody has some time, I'd love some feedback on it: http://theblogthatnoonereads.tunasoft.com/scrollbox_js/ -dave --~--~-~--~~~---~--~~ You received

[Rails-spinoffs] Re: Scrolling Box Widget

2007-04-10 Thread Dave Grijalva
Okay. I added keyboard navigation support as well as support for jumping to named anchors within the content div. -dave On 4/10/07, Dave Grijalva [EMAIL PROTECTED] wrote: Thanks for the feedback. I thought about using scriptaculous, but i decided against it in favor of not requiring

[Rails-spinoffs] Re: Using Ajax.Request, How can I access to parent context inside onSuccess callback ?

2007-04-12 Thread Dave Crane
onclick attributes and pals. Closures are a very powerful feature of JavaScript, enabling a much more fluid style of coding than the pure OO approach. Once you start getting your head around them, they can't be beat. HTH Dave On Thursday 12 April 2007 11:15, scramatte wrote: When I made an Ajax

[Rails-spinoffs] Re: XPath query in separate thread

2007-04-13 Thread dave crane
where the problem lies, I would hope. My gut feeling is that loading the XML doc is enough to bring IE to its knees, but a decent set of numbers and measurements are much better than the gut feelings of me or anyone else :-) HTH Dave On Friday 13 April 2007 09:59, lummie wrote: I am loading

[Rails-spinoffs] Re: server flush, keepalive and ajax

2007-04-13 Thread dave crane
with XHR, but it's a bit more fiddly than the Iframe trechnique, as you can't rely on onreadystatechange to notify you of updates. The Cometd/Bayeux people are building a proper pub/sub framework on top of all this, but it's early days. HTH Dave -- Author Ajax in Action http

[Rails-spinoffs] Re: Scrolling Box Widget

2007-04-17 Thread Dave Grijalva
I got a new revision up over the weekend. It's basically feature complete. -dave On 4/10/07, Dave Grijalva [EMAIL PROTECTED] wrote: Okay. I added keyboard navigation support as well as support for jumping to named anchors within the content div. -dave On 4/10/07, Dave Grijalva [EMAIL

[Rails-spinoffs] Re: Scrolling Box Widget

2007-04-23 Thread Dave Grijalva
the background of the handle to transparent. If you want the up/down buttons to be next to eachother, set the size of the scrollbar to the combined height of the buttons. You can also absolutely position the scrollbar just about anywhere at that point. -dave On Apr 20, 9:35 am, [EMAIL PROTECTED

[Rails-spinoffs] Re: Prototype based tree menu

2007-05-15 Thread Dave Crane
, but it's a bit too complex to serve as a learning example (e.g. we're using Effect.toggle() rather than Element.toggle(), ust to show off!) - should at least explain the DOM structure clearly if you point Firebug at it, though. HTH Dave -- -- Author Ajax in Action http

[Rails-spinoffs] Re: Prototype based tree menu

2007-05-16 Thread Dave Crane
to the width of the icon. Cheers, Dave On Tuesday 15 May 2007 16:46, David Dashifen Kees wrote: I'd suggest using a structure rather than hierarchical divs; I've made tree menus mostly out of unordered lists. The children of any node in a list are then contained within an internal ul within

[Rails-spinoffs] Re: AJAX, PHP and scriptalicious

2007-05-18 Thread Dave Crane
has a possibility of adding new items in as well, then you could mark them with a CSS class too, and apply an Effect.Appear() or whatever to add an extra bit of bling - I mean helpful user notification. :-) HTH Dave -- -- Author Ajax in Action http://manning.com/crane Ajax

[Rails-spinoffs] Re: IE-only error on serialize(), only when new inputs added with innerHTML

2007-05-18 Thread Dave Crane
iterator functions used in the spiffy prototype.js Array methods which together accounts for over 90% of the code that I write. You can add debugger; statements to the code to stop the debugger inside these functions, but that's a PITA. HTH Dave -- -- Author Ajax in Action

[Rails-spinoffs] Re: AJAX, PHP and scriptalicious

2007-05-18 Thread Dave Crane
Hi Michael, I think we're agreeing with each other? Delete at the DB, then delete locally when that's been confirmed, right? (And if the confirmation doesn't come back, do all those error-condition things that we omit from these sorts of examples.) Cheers, Dave On Friday 18 May 2007 14:18

[Rails-spinoffs] Re: IE-only error on serialize(), only when new inputs added with innerHTML

2007-05-22 Thread Dave Crane
Hi Charles, On Tuesday 22 May 2007 14:36, Charles St-Pierre wrote: Hi Dave, and thank you for your time (sorry if I respond only today. Long weekend here in Montreal, Canada) No worries. Long weekends are good for the soul. We have two of them in May here in the UK :) I've been trailing

[Rails-spinoffs] Re: character encoding problem : quite interesting

2007-05-23 Thread Dave Crane
for you. As it stands, I don't think they will, OTOH? FWIW, Prototype also has some good stuff for escaping and unescaping non-standard characters as HTML entities, which can be another source of headaches with international character sets. HTH Dave On Tuesday 22 May 2007 16:49, sughosh

[Rails-spinoffs] Re: How to convert a table to JSON (or to Javascript array)

2007-06-14 Thread Dave Crane
, but I think that's about it. If you're retrieving the HTML fragment from the server, you might like to consider whether there's a way of sending the JSON from the server instead. HTH Dave On Thursday 14 June 2007 01:57, phil swenson wrote: Is there a way to retrieve an HTML table in javascript

[Rails-spinoffs] Re: BestPractices: Ajax Periodical Updater ?

2007-06-14 Thread Dave Crane
very much bleeding edge, and full of hidden bear traps - the best implementation that I'm aware of is in the DWR toolkit. Depends how much effort you're willing to invest in figuring out all the issues. HTH Dave On Thursday 14 June 2007 09:46, Jean-Philippe Encausse wrote: Hi

[Rails-spinoffs] Re: A more fancy autocomplete using scriptaculous and ajax

2007-06-14 Thread Dave Crane
, Dave On Thursday 14 June 2007 14:29, junkmate wrote: I want to create an autocomplete text field that when you type in (some of) a users name, it pops up the portrait image associated to that user on the left hand side, which can then be dragged away in to a Sortable.Droppable element

[Rails-spinoffs] Re: JS debugger for IE

2007-06-20 Thread Dave Crane
. Dave On Wednesday 20 June 2007 08:34, Nathaniel Brown wrote: http://www.getfirebug.com/lite.html http://www.phpied.com/firebug-console-for-ie/ http://remysharp.com/2007/03/13/firebug-in-ie-for-any-web-site/ On 6/17/07, Sudhir [EMAIL PROTECTED] wrote: thanks a lot... will check them out

[Rails-spinoffs] Re: Updater

2007-06-20 Thread Dave Crane
Hi Craig, Nothing looks wrong with your code, on first glance. What does the code look like once it's been through Cold Fusion (I'm guessing that's what those cfoutput tags are?) Can you view-source for the page, and tell us what the browser sees? Thanks, Dave On Tuesday 19 June 2007 22

[Rails-spinoffs] Re: JS debugger for IE

2007-06-21 Thread Dave Crane
inline function declarations in the way I've described (a basic prerequisite for being 'capable' IMO)? If so, I'll happily burden my machine with it's 300MB presence and abstain from saying rude things about MS tools for, ooh, a whole day at least. TIA Dave Crane On Wednesday 20 June 2007 15:02

[Rails-spinoffs] Re: HTML / CSS help site

2007-06-21 Thread Dave Crane
Hi Danilo, I can give you a good website - http://alistapart.com/topics/code Lots of useful articles, especially on CSS, with a strong emphasis on doing things right. Eric Meyer's site also has some good CSS material on it http://meyerweb.com HTH Dave On Thursday 21 June 2007 13:19

[Rails-spinoffs] Re: Bracket Notation

2007-06-21 Thread Dave Crane
aware. HTH, Dave On Thursday 21 June 2007 16:36, sed wrote: Does anyone have any info on using prototype, but also having script with bracket notation? like document.main.[name].value. This seems to no longer work with prototype included. -- Author: Prototype Scriptaculous in Action

[Rails-spinoffs] Re: JS debugger for IE

2007-06-21 Thread Dave Crane
getting triggered whenever _anything_ happens, if you have lots of calls to it peppeed through the code. And if you need to uncomment the calls to the anon debug fn, you're back to writing debugger; statements. I'll give it a try anyway, and see what it feels like in practice. Cheers, Dave

[Rails-spinoffs] ajax and flash video streaming

2007-07-01 Thread dave-s
for any help posted. Cheers Dave-S --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Spinoffs group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group

[Rails-spinoffs] Ajax.PeriodicalUpdater can the frequency be changed dynamically?

2007-07-02 Thread dave-s
I'd like to be able to change the update frequency [dynamically] is this possible? I've tried to embed java script in the returned html from the call to a php program for example...this.frequency=15 but it does not change the frequency, can anyone help? Thanx in advance Dave-S

[Rails-spinoffs] Re: ajax and flash video streaming

2007-07-02 Thread dave-s
.innerHTML='htmlHTML to be displayed in the divhtml';; echo myAjax.stop(); ; echo setTimeout(\myAjax.start()\,2); ; echo /script; echo /body; echo /html; ? On Jul 1, 12:14 pm, dave-s [EMAIL PROTECTED] wrote: I'm using the Ajax.PeriodicalUpdater [within prototype.js] to poll some php every couple

[Rails-spinoffs] Re: Prototype Enumerable sortBy example

2007-07-12 Thread Dave Crane
Hi, Which bit doesn't work? What error do you get? What browser are you using? I just tried the examples out, and they both work OK for me. Dave On Thursday 12 July 2007 09:38, Elast wrote: Hi all! Please show me example how to sort some array with Prototype's Enumerable class. Example

[Rails-spinoffs] Re: weird local development safari javascript problem

2007-07-19 Thread Dave Crane
servers available these days (I tend to use Tomcat, reflecting my Java bias, I'm sure the list can suggest many more). I'd suggest you always serve your app from a web server during all stages of development, even if you aren't using any dynamically generated content. HTH Dave On Thursday 19

[Rails-spinoffs] Adding event handlers AFTER creation

2007-08-15 Thread Dave Stewart
everything. Can someone point out what I should do? Many thanks, Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Spinoffs group. To post to this group, send email to rubyonrails-spinoffs

[Rails-spinoffs] Re: Sortables Callback Functions

2007-08-15 Thread Dave Stewart
I think you would use Draggable's observers here: function saveDraggableOrder(){ // your code here } var draggableObserver = { element:null, onStart:function(eventName, draggable, event){ }, onDrag:function(eventName, draggable, event){

[Rails-spinoffs] How would I change the drop behavior of a sortable's draggable?

2007-08-15 Thread Dave Stewart
Specifically, if I drop a draggable on a droppable, but I decide that it can't be droopped there, how do I make it go to another droppable instead? Can I just fire another method? Thanks, Dave --~--~-~--~~~---~--~~ You received this message because you

[Rails-spinoffs] Re: How would I change the drop behavior of a sortable's draggable?

2007-08-15 Thread Dave Stewart
to the source so they coudl be re-dropped on other targets. Does that make sense? Cheers, Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Spinoffs group. To post to this group, send email

[Rails-spinoffs] Re: Adding event handlers AFTER creation

2007-08-15 Thread Dave Stewart
Hi Diodeus, Yup - giving the draggables the correct class worked! I was so busy with other stuff I must have overlooked that - thanks! I'm still interested to know how I set handlers on objects AFTER creation though, as it's very useful for other things.

[Rails-spinoffs] Re: How would I change the drop behavior of a sortable's draggable?

2007-08-15 Thread Dave Stewart
I've taken a look at the source code and whilst I understand some of it, there's a lot that goes over my head. I can hack around and sometimes make things happen, but as I said - it's mainly hacking. Fingers crossed that someone else chips in... (What we need is documentation to the same

[Rails-spinoffs] Re: How would I change the drop behavior of a sortable's draggable?

2007-08-17 Thread Dave Stewart
Hi Gareth, Thanks for chipping in! This sounds like we are doing very similar things. In my case I'm going to have a confirm box saying Are you sure you want to drag this item here?, and if not I'll move the item back. I assume the reverteffect mothod is what you're talking about?

[Rails-spinoffs] Re: event.target.readAttribute undefined

2007-08-17 Thread Dave Stewart
If you're trying to get the target element of the event use: Event(evt).element --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Spinoffs group. To post to this group, send email to

[Rails-spinoffs] Re: appendChild() as iterator for each() in Firefox

2007-08-17 Thread Dave Stewart
Hmm... some checking: $R(1,5).each(alert) // this works $R(1,5).each(window.alert) // this works $R(1,5).each(document.write) // this doesn't work Maybe it's an issue with the document object? --~--~-~--~~~---~--~~ You received this message because you are

[Rails-spinoffs] Re: How would I change the drop behavior of a sortable's draggable?

2007-08-18 Thread Dave Stewart
a permission thing basically, as they'll be initiating some fundamental database re-ordering, and having people be emailed, so they'll need to be sure that is actually what they intended. I'll report back on success / progress, but in the meantime thanks again for the tip. Dave

[Rails-spinoffs] Re: French documentation

2007-08-20 Thread Dave Stewart
I would say that both you guys have pretty good English! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Spinoffs group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To

[Rails-spinoffs] Update changing visibility?

2008-06-04 Thread Dave Stein
I have made a custom lightbox. What matters is that it pops up saying Loading in a small div. I then set the visibility to hidden when I get the data to update. Next I update the div with $ ('innerDIV').update(updateTxt);.I then reposition it to center on screen based on the height and width.

[Rails-spinoffs] Re: Update changing visibility?

2008-06-04 Thread Dave Stein
The element I am changing is absolutely positioned so it doesn't matter that it takes up space on the page still - no one can tell. I am using visibility, as Justin said, to calculate while user can't see it. Does this seem like a glitch? I don't understand why update would be affecting my style

[Rails-spinoffs] Re: Update changing visibility?

2008-06-04 Thread Dave Stein
Eh I found the answer after much frustration. You see I started reworking my lightbox and was testing on the worst page possible it would seem. One of my popups has a command in EXT. For some reason EXT is making the layer visible so that is my problem. I am going to look into it now. Sorry about