[mochikit] Re: Selector speedup by using John Resig's Sizzle
Hey Everyone - Ah, ok. I just thought the test was buggy. != is not actually defined by CSS3, so I went by the jQuery definition which is this: Matches elements that either don't have the specified attribute or do have the specified attribute but not with a certain value. I.e. it explicitly says it matches elements w/o that attribute. Of course this is no standard, if you think we should use the other semantics I don't mind. Obviously we can discuss this some more but my interpretation of [attr! =value] was that it was equivalent to :not([attr=value]). Yes, I'm actually not sure what the status on Sizzle development is - but John has at least not updated the github version since posting it originally. Unfortunately I don't have access to IE6 or time to set up a virtual machine - but if you try debugging it I'd be happy to help with the little insight I gained last night. I got bogged down here recently but I'm starting back up (since I want to be able to land this for jQuery 1.3 this month). What sort of timeline are you guys on for your 1.4 release? I would also vote against pushing this to a release as it stands now. Naturally - IE support is still a minefield. I will have a look at the tests and confirm what is the correct outcome. Safari was also failing on several unit tests for me, I will also look at that tonight. Let me know if the NodeList/Array mis-match exists, I can look in to that. Ok, I'll start work on that too. I think I would move everything inside Sizzle (and submit a patch to John) and then move Sizzle into MochiKit.Selector. It should be easy, just a little legwork. I was planning on just encapsulating all the functionality and selectively exposing it where needed, specifically: (function(){ ... var Sizzle = this.Sizzle = function(){ ... }; })(); No need to namespace the random state variables that are used internally. 8. The Sizzle result cache seems to break if people start manipulating the returned arrays (using shift, pop or similar). Basically this: return cache doCache ? (cache[ selector ] = results) : results; should become: if (cache doCache) { cache[selector] = results.slice(0); } return results; Ok, I'll have a look. Otherwise this is a comment for John I guess. That seems like a reasonable change. Right, I'm not sure what is best to do here. Should we rely on querySelectorAll where it is available - simply to have the best performance, or is identical semantics on all browsers more important? For the latter there are two ways, don't use querySelectorAll (and take the performance penalty) or strip out the features not supported by it (and take the feature penalty). Right now there is no feature penalty to using querySelectorAll. Sizzle just falls back to the old selector code, if qSA doesn't know how to handle a selector. If something isn't working correctly in this regard then it should definitely be fixed. This is another comment for John I guess. I don't necessarily agree with you though, its function was relatively clear after pasting it intohttp://regexpal.com/and playing with it for a minute. I could attempt to explain it a little bit more with comments, I guess. I'll see what I can do. Right, there are several bugs of this kind in Sizzle already. I'll look in to the one mentioned here. Thanks for the review guys, I appreciate it! --John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] help with createDOM
Hello, I'm new to mochikit, i'm trying to use it to create HTML fragments with DOM api (i'm using mochikit from SVN). The following code is working : // var new_node = H1('hello'); var target = document.getElementById('title'); swapDOM(target, new_node); // hello is correctly displayed. But this code NOT : // var new_node = DIV({'id':'title'}, H1('hello')); var target = document.getElementById('title'); swapDOM(target, new_node); // [object HTMLHeadingElement] is displayed in place of hello. Do you have any working example of DOM usage please ? Thx. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Minimum Files?
I want to host the least amount of files, minified. What files/folders are unnecessary or duplicates but still legal and fully-functional? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Minimum Files?
I downloaded the release version. The basic file structure is: / - Changes, LICENSE.txt, MANIFEST, META.json /doc /examples /include /lib /packed /tests I'd prefer not to use the packed version, so I believe the only folder I need is lib. Do I what does include to? On Jun 18, 10:32 am, machineghost [EMAIL PROTECTED] wrote: You probably only need one file: Mochikit.js. This file contains most of the MochiKit libraries (but not all; I forget exactly which ones it leaves out) in a compacted form. The compacting isn't perfect though, so if you really need to remove every last k possible you could probably shrink it a bit more by using the YUI Compressor (or something similar). Hope that helps. Jeremy On Jun 18, 9:57 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to host the least amount of files, minified. What files/folders are unnecessary or duplicates but still legal and fully-functional? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Minimum Files?
Oh man, my middle school teacher would kill me :P. Thanks for the help. On Jun 18, 2:52 pm, machineghost [EMAIL PROTECTED] wrote: Do I what does include to? That's not even a sentence, let alone a question, but I'll try to answer it anyway ;-) If you don't want to use the packed version, the files you need are in lib/MochiKit. The only one you NEED is Base.js; if all you have in your HTML is: script src=Base.js/script you'll be able to use every one of the basic Mochikit functions without a problem. However, MochiKit has a lot more to offer than just the Base library. Personally I consider the DOM and Signal libraries indispensable, but I wouldn't be caught dead using the logging library (why bother if you have Firebug?). You'll have to make a similar decision based on your needs, and then you will need to include each library you want to use with a new script tag (along with any of their dependencies). Of course, the order of these tags will be dictated by their librariy's requirements. For instance, if you want Base and DOM, you'll also need Iter and Style, and your HTML should look something like: script src=Base.js/script script src=Iter.js/script !-- Has to come after Base because it requires it -- script src=Style.js/script !-- Has to come after Base because it requires it -- script src=DOM.js/script !-- Has to come after the other 3, as it requires all of them -- Hope that helps (if it didn't, try making your question as intelligible as possible next time). Jeremy On Jun 18, 11:06 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I downloaded the release version. The basic file structure is: / - Changes, LICENSE.txt, MANIFEST, META.json /doc /examples /include /lib /packed /tests I'd prefer not to use the packed version, so I believe the only folder I need is lib. Do I what does include to? On Jun 18, 10:32 am, machineghost [EMAIL PROTECTED] wrote: You probably only need one file: Mochikit.js. This file contains most of the MochiKit libraries (but not all; I forget exactly which ones it leaves out) in a compacted form. The compacting isn't perfect though, so if you really need to remove every last k possible you could probably shrink it a bit more by using the YUI Compressor (or something similar). Hope that helps. Jeremy On Jun 18, 9:57 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to host the least amount of files, minified. What files/folders are unnecessary or duplicates but still legal and fully-functional? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Mouse wheel patch
Ah magic numbers don't you love them :) The following link points to a blog entry that goes into detail about normalising the mouse wheel event so that it can be used cross browser without going insane. http://blog.paranoidferret.com/index.php/2007/10/31/javascript-tutorial-the-scroll-wheel/ Most of what I did just stems from that but has been made to be friendly with MochiKit. On Jun 3, 5:39 pm, Per Cederberg [EMAIL PROTECTED] wrote: Thanks! I'll apply this patch shortly to the svn repository. It will be committed in parts, separating the actual mouse wheel stuff from code fixing other issues in signal(), etc. One question though. I see that the Mozilla event.details value is considered equivalent to -event.wheelDelta / 40. But where does this magic number 40 come from? I see from MSDN that wheelDelta is always returned in multiples of 120. Is this just assuming that a wheel event always scrolls 3 lines? Cheers, /Per On Tue, Jun 3, 2008 at 8:55 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Below is a patch for adding mousewheel handling to mochikit. It has been made against SVN 1383. It contains changes to Signal.js and some demo pages that end up in examples. My main need for this is to try and suppress the scrolling of a page after the contents of a div have been fully scrolled. The example manages to do this for FF but fails in IE if you scroll quickly enough. If anybody has any ideas on how to make this work reliably in IE I'd love to hear about it. This patch makes no attempt at making all of the signal handling late bound (as mentioned in by Per in a previous message), it just refactors Signal.connect a bit to create custom handlers for mouse wheel events and for the existing mouseenter/leave stuff. - Sim diff -r 3354b0497e7a MochiKit/Signal.js --- a/MochiKit/Signal.jsFri May 30 12:43:36 2008 +1000 +++ b/MochiKit/Signal.jsTue Jun 03 16:45:16 2008 +1000 @@ -63,7 +63,7 @@ str += '}'; } } -if (this.type() == 'mouseover' || this.type() == 'mouseout' || +if (this.type() == 'mouseover' || this.type() == 'mouseout' || this.type() == 'mouseenter' || this.type() == 'mouseleave') { str += ', relatedTarget(): ' + repr(this.relatedTarget()); } @@ -94,6 +94,13 @@ /** @id MochiKit.Signal.Event.prototype.target */ target: function () { return this._event.target || this._event.srcElement; +}, + +wheelData: function() { + if (! this._wheelData) { +this._wheelData = this._event.detail ? this._event.detail * -1 : this._event.wheelDelta / 40; + } + return this._wheelData; }, _relatedTarget: null, @@ -516,10 +523,10 @@ if (sig === 'onload' || sig === 'onunload') { return function (nativeEvent) { obj[func].apply(obj, [new E(src, nativeEvent)]); - + var ident = new MochiKit.Signal.Ident({ source: src, signal: sig, objOrFunc: obj, funcOrStr: func}); - + MochiKit.Signal._disconnect(ident); }; } else { @@ -531,10 +538,10 @@ if (sig === 'onload' || sig === 'onunload') { return function (nativeEvent) { func.apply(obj, [new E(src, nativeEvent)]); - + var ident = new MochiKit.Signal.Ident({ source: src, signal: sig, objOrFunc: func}); - + MochiKit.Signal._disconnect(ident); }; } else { @@ -576,6 +583,69 @@ }; }, +_makeMouseEnterListener: function(self,src, sig, func, obj) { + var listener = self._mouseEnterListener(src, sig.substr(2), func, obj); + self._addEventListener(src, + (sig === onmouseenter) ? onmouseover : onmouseout, + listener ); + return listener; +}, + +_mouseWheelListener: function (src, sig, func, obj) { +var E = MochiKit.Signal.Event; + +// return a closure that smooths over the differences between browsers +return function (nativeEvent) { + var e = new E(src, nativeEvent); + e.type = function () { return sig; }; + + // let the connected function deal with it + if (typeof(func) == string) { +return obj[func].apply(obj, [e]); + } else { +return func.apply(obj, [e]); + } +}; +}, + +_makeMouseWheelListener: function (self,src,sig,func,obj) { + var listener = self._mouseWheelListener(src, sig.substr(2), func, obj); + + // takes care of IE, Opera, etc + self._addEventListener(src, onmousewheel, listener
[mochikit] Mouse wheel patch
not scroll! br / + Scroll Me and then the page does not scroll! br / + Scroll Me and then the page does not scroll! br / +/div + +div class=paddingIgnore me I just make the page big enough to require scrollbars./div +div class=paddingIgnore me I just make the page big enough to require scrollbars./div +div class=paddingIgnore me I just make the page big enough to require scrollbars./div +div class=paddingIgnore me I just make the page big enough to require scrollbars./div +div class=paddingIgnore me I just make the page big enough to require scrollbars./div +div class=paddingIgnore me I just make the page big enough to require scrollbars./div +div class=paddingIgnore me I just make the page big enough to require scrollbars./div +div class=paddingIgnore me I just make the page big enough to require scrollbars./div +div class=paddingIgnore me I just make the page big enough to require scrollbars./div +/body +/html diff -r 3354b0497e7a examples/mousewheel_events/mousewheel_events.css --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/examples/mousewheel_events/mousewheel_events.css Tue Jun 03 16:45:16 2008 +1000 @@ -0,0 +1,17 @@ +h1 { +font-size: 2em; +color: #4B4545; +text-align: center; +} + +div.scroll-box { + border : 2px solid blue; + padding : 4ex 4em; + margin : 4ex 4em; +} + +div.padding { + padding : 4ex 4em; + margin : 4ex 4em; + border : 1px solid silver; +}; \ No newline at end of file diff -r 3354b0497e7a examples/mousewheel_events/mousewheel_events.js --- /dev/null Thu Jan 01 00:00:00 1970 + +++ b/examples/mousewheel_events/mousewheel_events.js Tue Jun 03 16:45:16 2008 +1000 @@ -0,0 +1,56 @@ +/* + +Mouse Events: Simple Mouse Scrolling Handlers + +*/ + +function showWheelData( event ) { + getElement(show-wheeldata-ouput).innerHTML = event.wheelData(); + event.stop(); +}; + +function stopPageFromScrolling( event ) { + var src = event.src(); + var scrollTop = src.scrollTop; + + // While trying to stop scrolling events for IE, found that it + // jumped around a bit. The following fudgetFactor is NOT the way + // to handle this but was the best I could do with the limited time + // I had. + var fudgeFactor = /MSIE/.test(navigator.userAgent) ? 25 : 0; + + // scrolling up + if (event.wheelData() 0) { +// Following test should probably be if (scrollTop == 0) which +// works in FF but not IE. +if (scrollTop = fudgeFactor) { + event.stop(); +} + } + //..scrolling down + else { +// Following test should be if (scrollTop == src.scrollHeight - src.clientHeight), +// see comment above. +if (src.scrollHeight = (scrollTop + src.clientHeight + fudgeFactor)) { + event.stop(); +} + } +}; + +function connectMouseWheelEvents(){ + connect(show-wheeldata, onmousewheel, showWheelData); + connect(no-scroll-page, onmousewheel, stopPageFromScrolling); +}; + +connect(window, 'onload', +function() { + connectMouseWheelEvents(); + var elems = getElementsByTagAndClassName(A, view- source); + var page = mousewheel_events/; + for (var i = 0; i elems.length; i++) { +var elem = elems[i]; +var href = elem.href.split(/\//).pop(); +elem.target = _blank; +elem.href = ../view-source/view-source.html# + page + href; + } +}); diff -r 3354b0497e7a tests/test_MochiKit-Signal.html --- a/tests/test_MochiKit-Signal.html Fri May 30 12:43:36 2008 +1000 +++ b/tests/test_MochiKit-Signal.html Tue Jun 03 16:45:16 2008 +1000 @@ -4,26 +4,27 @@ script type=text/javascript src=../MochiKit/Iter.js/ script script type=text/javascript src=../MochiKit/DOM.js/script script type=text/javascript src=../MochiKit/Style.js/ script -script type=text/javascript src=../MochiKit/Signal.js/ script -script type=text/javascript src=../MochiKit/Logging.js/ script -script type=text/javascript src=SimpleTest/SimpleTest.js/ script +script type=text/javascript src=../MochiKit/Signal.js/ script +script type=text/javascript src=../MochiKit/Logging.js/ script +script type=text/javascript src=SimpleTest/SimpleTest.js/ script link rel=stylesheet type=text/css href=SimpleTest/ test.css /head body Please ignore this button: input type=submit id=submit /br / +Please ignore this button: input type=submit id=test /br / pre id=test script type=text/javascript src=test_Signal.js/script script type=text/javascript try { - + tests.test_Signal({ok:ok, is:is}); ok(true, test suite finished!); - + } catch (err) { - + var s = test suite failure!\n; var o = {}; var k = null; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit
[mochikit] patch for ticket 304
() correct ); @@ -282,7 +282,7 @@ is( kv[0].join(,), selempty,selempty2, formContents names empty option values ); is( kv[1].join(,), ,foo, formContents empty option values ); is( queryString(form_test2), selempty=selempty2=foo, queryString empty option values ); - + var d = DIV(null, SPAN(), \n\t, SPAN(), foo, SPAN(), ); is( d.childNodes.length, 6, removeEmptyNodes test conditions correct ); removeEmptyTextNodes(d); @@ -302,11 +302,14 @@ ok( isChildNode('child', document.body), isChildNode of body); ok( isChildNode($('child').firstChild, 'parentTwo'), isChildNode text node); +ok( !isChildNode( SPAN(), document.body), isChildNode child not in DOM); +ok( !isChildNode( SPAN(), 'child'), isChildNode child not in DOM); + +ok( !isChildNode( 'child', SPAN()), isChildNode parent not in DOM); + ok( true, test suite finished!); - - } catch (err) { - + var s = test suite failure!\n; var o = {}; var k = null; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] clone issue on Firefox3 / Linux
To see it, open up Firebug in Firefox 3.0b4, and try this: [].toString() clone([]).toString() ReferenceError: clone is not defined [Break on this error] undefined - Issac --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Can MochiKit support Comet/http push/long polling ???
I'm a big fan of MochiKit and it has served me well. I recently learned I can replace AJAX polling with something much better called Comet aka long polling aka http push. I know there is a TurboGears+Dojo presentation at Pycon on this but I was wondering if we must all replace MochiKit for Dojo to do this paradigm. Furthermore, doesn't Comet/http push/long polling require some modifications to your *server* to do it right?? (e.g. event driven instead of multithreaded ??) I don't see how Dojo or any Javascript library can do it all by itself. Sincerely, Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Can MochiKit support Comet/http push/long polling ???
It is good news that long polling is portable and works with MochiKit. I'm confused how you would make your server implement long polls for MochiKit. For example, how would you make TurboGears server do Comet long polling? Chris On Mar 4, 7:29 am, Bob Ippolito [EMAIL PROTECTED] wrote: I've implemented long-polling with MochiKit before. The JavaScript doesn't really change all that much, you just use doXHR like you normally would, the response just doesn't come back for a while and as soon as you get one then you make another one, and you have to have some sort of empty response that you ignore. It doesn't make a whole lot of sense to implement more than one or two of the comet mechanisms.. Long polling works pretty well across the board, for example. On Mon, Mar 3, 2008 at 9:43 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I'm a big fan of MochiKit and it has served me well. I recently learned I can replace AJAX polling with something much better called Comet aka long polling aka http push. I know there is a TurboGears+Dojo presentation at Pycon on this but I was wondering if we must all replace MochiKit for Dojo to do this paradigm. Furthermore, doesn't Comet/http push/long polling require some modifications to your *server* to do it right?? (e.g. event driven instead of multithreaded ??) I don't see how Dojo or any Javascript library can do it all by itself. Sincerely, Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Shouldn't doXHR default to POST instead of GET to be proper?
On Jan 21, 1:16 am, troels knak-nielsen [EMAIL PROTECTED] wrote: That depends on how you use it. The assumption is, that you are pulling data with doXHR. If you want to push data, you should specify the method. Most other HTTP-agents also default to using GET, and only use POST, when explicitly told to. (Take the browser, for example) I thought loadJSON was for pulling from server and doXHR was for pushing to server. I didn't know doXHR could be used for both. I suppose you'll say that doXHR is needed when people do NOT want to pull data from server in JSON format? Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] How prepend a prefix like /myapp/ to all URLs in MochiKit/Javascript?
I'm happily using MochiKit in TurboGears. TurboGears has a nice setting to add prefixes to all URLs (server.webpath). For example, for server.webpath = /myapp: /a - /myapp/a /b - /myapp/b etc. This does *not* seem to affect Javascript code. Anyway to do something similar in my MochiKit/Javascript code? Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Form validation example
Since responding to the other topic was reposting old messages of mine, I've decided to try a new topic with the example and code, so that it's less confusing. I'l start with the basics. The premise of my form validation script is that the validation occurs server side, and I use javascript to post the form and interpret results from the server. These are the basic steps: 1. User fills in form and submits. 2. Server validates field values and responds with a none if there are no validation errors or json data describing the errors. 3. Javascipt in the browser confirms the submittal or displays error information, depending on what the server sent back. 4. If necessary, user corrects form and resubmits. The form isn't a true form. There isn't a form tag. For every field that will be validated there is a corresponding span to display any validation errors, if they are needed. The naming system is pretty straight forward. For a form field with an id lastName the error message span has an id lastName_error. We'll start with a really simple form with one field, like so: input type=text id=lastName value= /span id=lastName_error/span You'll want to activate the submit with a connect like this: connect(some_submit_button, onclick, submit_handler); We submit it with an Ajax post using this javascript code: submit_handler = function() { var url = /server_script_url/; var field_list = ['lastName']; var error_span_list = ['lastName_error']; i = 0; while(i error_span_list.length) { $(error_span_list[i]).innerHTML = ; i++; } var lookup = function(field_list){ return $(field_list).value; } var field_values = imap(lookup,field_list); var d_querystring = queryString(field_list,list(field_values)); var d_setup = getXMLHttpRequest(); d_setup.open( POST, url, true); d_setup.setRequestHeader('Content-Type', 'application/x-www-form- urlencoded'); d_setup.setRequestHeader('Cache-Control', 'no-cache'); var d = sendXMLHttpRequest( d_setup, d_querystring); d.addCallbacks(handleServerFeedback,handleServerError); } This code also clears any error messages the page was displaying when the form was submitted. Next the server script goes through validation. In this example we'll assume the field lastName isn't allowed to be blank. If the field has some text in it the server will send back the string none. If the field is blank the server will send back a json formatted string like this: {error:[{field:lastName,error_message:lastName can not be blank.}]} Now we need the javascript that handles the response from the server. These will be the functions handleServerFeedback and handleServerError. First, handleServerFeedback: function handleServerFeedback(d_setup) { if ((strip(d_setup.responseText)) == none) { // code for a successful submit } else { error_obj = evalJSONRequest(d_setup); error_array = error_obj['error']; i = 0; while(i error_array.length) { error_id = error_array[i].field + _error; $(error_id).innerHTML = error_array[i].error_message; i++; } } } The else portion of this function goes through the json string and puts the error messages where they belong. Next is handleServerError: function handleServerError() { // code for a server error } The nice thing about this is that to submit more fields you just expand the list. Here's the field and error list with an additional field: var field_list = ['lastName','firstName']; var error_span_list = ['lastName_error','firstName_error']; To get the code I show above, I've cut out large portions of my own scripts. For example, I pass the values to my submit handler, I don't hardcode them in the function. I also display feedback to the user about what's going on. I use ColdFusion to do my validation, primarily the IsValid function. Between that and string functions I can validate any data type I want. If the validation is successful the script can go right into a database update or insert. I hope this helps, please let me know if I fat fingered any of the code above. Also, feel free to post questions or criticisms. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Form Validation
Geez, now my 1st post shows up a day late. Anywho, ignore the first long post, plz. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Form Validation
I posted my script this weekend, but it seems to have gone bye bye, so I'll try again. I'l start with the basics. The premise of my form validation script is that the validation occurs server side, and I use javascript to post the form and interpret results from the server. These are the basic steps: 1. User fills in form and submits. 2. Server validates field values and responds with a none if there are no validation errors or json data describing the errors. 3. Javascipt in the browser confirms the submittal or displays error information, depending on what the server sent back. 4. If necessary, user corrects form and resubmits. The form isn't a true form. There isn't a form tag. For every field that will be validated there is a corresponding span to display any validation errors, if they are needed. The naming system is pretty straight forward. For a form field with an id lastName the error message span has an id lastName_error. We'll start with a really simple form with one field, like so: input type=text id=lastName value= /span id=lastName_error/span You'll want to activate the submit with a connect like this: connect(some_submit_button, onclick, submit_handler); We submit it with an Ajax post using this javascript code: submit_handler = function() { var url = /server_script_url/; var field_list = ['lastName']; var error_span_list = ['lastName_error']; i = 0; while(i error_span_list.length) { $(error_span_list[i]).innerHTML = ; i++; } var lookup = function(field_list){ return $(field_list).value; } var field_values = imap(lookup,field_list); var d_querystring = queryString(field_list,list(field_values)); var d_setup = getXMLHttpRequest(); d_setup.open( POST, url, true); d_setup.setRequestHeader('Content-Type', 'application/x-www-form- urlencoded'); d_setup.setRequestHeader('Cache-Control', 'no-cache'); var d = sendXMLHttpRequest( d_setup, d_querystring); d.addCallbacks(handleServerFeedback,handleServerError); } This code also clears any error messages the page was displaying when the form was submitted. Next the server script goes through validation. In this example we'll assume the field lastName isn't allowed to be blank. If the field has some text in it the server will send back the string none. If the field is blank the server will send back a json formatted string like this: {error:[{field:lastName,error_message:lastName can not be blank.}]} Now we need the javascript that handles the response from the server. These will be the functions handleServerFeedback and handleServerError. First, handleServerFeedback: function handleServerFeedback(d_setup) { if ((strip(d_setup.responseText)) == none) { // code for a successful submit } else { error_obj = evalJSONRequest(d_setup); error_array = error_obj['error']; i = 0; while(i error_array.length) { error_id = error_array[i].field + _error; $(error_id).innerHTML = error_array[i].error_message; i++; } } } The else portion of this function goes through the json string and puts the error messages where they belong. Next is handleServerError: function handleServerError() { // code for a server error } The nice thing about this is that to submit more fields you just expand the list. Here's the field and error list with an additional field: var field_list = ['lastName','firstName']; var error_span_list = ['lastName_error','firstName_error']; To get the code I show above, I've cut out large portions of my own scripts. For example, I pass the values to my submit handler, I don't hardcode them in the function. I also display feedback to the user about what's going on. I use ColdFusion to do my validation, primarily the IsValid function. Between that and string functions I can validate any data type I want. If the validation is successful the script can go right into a database update or insert. I hope this helps, please let me know if I fat fingered any of the code above. Also, feel free to post questions or criticisms. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Form Validation
I ran into this a few months ago myself. I ended up writing a form validation script that uses json data returned from the server to either display validation errors or a submission confirmation. This has worked out pretty well, and been fairly easy to replicate on other forms. On Aug 20, 7:53 am, Jason Bunting [EMAIL PROTECTED] wrote: Lee Connell asked: Are there form validation helpers in mochikit? No and yes - there are not any in the sense you are probably thinking, but by virtue of the fact that MochiKit makes JavaScript suck less, there are. Hope that makes sense. Look through the relatively complete documentation and you will see what is provided; MochiKit has very little in its API that is as task-specific as form validation helpers, instead providing generic helps. Jason Bunting No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.484 / Virus Database: 269.12.0/961 - Release Date: 8/19/2007 7:27 AM --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Async status success return codes question
So is this yet another thread on success codes that ends without consensus or a final word on success code meaning in MochiKit? Obviously I would prefer it if MochiKit treated all 2** as successes but if the decision is that this wont change then I'll just implement the work around and take it of my TODO list. So Bob can you provide the final word? Regards, Simon Cusack --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Debugging in IE[67]?
Recent list of debugging tools on IEBlog: http://blogs.msdn.com/ie/archive/2007/06/22/from-microsoft-teched-2007-web-development-tools-for-internet-explorer.aspx Inside the post are several links to tools, including an article that explains how to use the debugger in (the MS freeware) WebDeveloper Express. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] How about a review?
Hi I took the liberty of adding MochiKit to ITerating but I don't feel confident enough to review it. Maybe you guys can write some lines about it and bring it to the top of the list! :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] req.responseText problems
I seem to be having a problem with req.responseText not changing when a new one comes from the server. For example, I am using req.responseText to get form validation feedback based on server side coding. When the server has no problems the server output is whitespace, when it doesn't like form fields it sends back a JSON coded string with the error information. Everything works great on the first POST. Following posts do exactly what they are supposed to on the server side, but the req.responseText doesn't refresh. Do I need to clear it or something? This is really a problem since the page keeps showing errors when the server is only sending whitespace back! Here's my POST code, the querystring is coded (correctly) above it: var d_setup = new getXMLHttpRequest(); d_setup.open( POST, url, true); d_setup.setRequestHeader('Content-Type', 'application/x-www-form- urlencoded'); var d = sendXMLHttpRequest( d_setup, d_querystring); d.addCallbacks(handleServerFeedback,handleServerError); Thanks for responses ahead of time. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Async status success return codes question
I have been working with Async to build an inhouse web app, we have ended up using the return codes to implement some interesting behaviour in our clients. MochiKit is just one of the clients that uses the web service and some of our other processes (robots essentially) look for return codes to act upon. One of these codes is 202 - Accepted. We use this in response to requests that fire off long running processes in the server. The server responds with a 202 saying that it is now running the process and includes a location header to indicate where the client should go to get updates on the current status of the process. By default MochiKit doesn't treat a 202 as a success. I have read the other messages on the list about this but there didn't seem to be a consensus of opinion on why the current codes are considered successes but others aren't. I know that I could add an errback that redirects requests with 202 to the success callback but it seems like a hack. I have changed the following in my version of MochiKit; From: // 200 is OK, 201 is CREATED, 204 is NO CONTENT // 304 is NOT MODIFIED, 1223 is apparently a bug in IE if (status == 200 || status == 201 || status == 204 || status == 304 || status == 1223) { d.callback(this); To: // Anything in the 200 range is a success. // 304 is NOT MODIFIED, 1223 is apparently a bug in IE if (((199 status) (status 300)) || (status == 304) || (status == 1223)) //..IE - sigh.. { d.callback(this); } This new code looks like it is treating non-existent codes as successes (for example 242 would be treated as a success), however the RFC says that anything in that range is a success (well from my reading anyway*) so I don't think that MochiKit should be putting its own definition of what a success is on top of what the RFC says. Any thoughts by anyone? Any chance MochiKit will change to work like this? Regards, Simon Cusack. * The relevant bit of the RFC http://www.faqs.org/rfcs/rfc2616.html is 10.2 Successful 2xx This class of status code indicates that the client's request was successfully received, understood, and accepted. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Documentation and zip function
Hi guys, I think the information about the zip function is missing in the documentation, it talks about izip but don´t cover zip function. Best regards and thanks for the good work! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Is there Slider Class available in MochiKit?
Hi, I'm new with all this free javascript library thing but I have been studying them now for a while and noticed that both MochiKit and Scriptaculous are offering many interesting and cool things to play with. I wonder if someone has come up with whether it is possible or not to create with MochiKit same kind of slider as it is possible with Scriptaculous? I know that there isn't yet a Slider Class in the MochiKit included, but is there perhaps some other way to implement something like it? ... Luukku Plus paketilla pääset eroon tila- ja turvallisuusongelmista. Hanki Luukku Plus ja helpotat elämääsi. http://www.mtv3.fi/luukku --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] getElementDimension() for inline element
Hi, I have come across a cross-browser issue when playing around with MochiKit.Style.getElementDimensions() and MochiKit.Style.getElementPosition(). Suppose that I have a DIV, containing a paragraph with a link, like so: div pThis is a div with some text and a id=link href=#a link that may line wrap/a inside. More text./p /div In the examples below I call MochiKit.Style.getElementDimensions(link) and MochiKit.Style.getElementPosition(link). exampleTwo.html is identical to exampleOne.html, except that I restrict the width of the DIV to 250px so that the link is line- wrapped and appears on two lines. Thus, the height of the link doubles. I and the three tested browsers agree on this. But what about the width? And the x-position? In Firefox 2.0.0.3/Linux the width of the link goes from 131px to 225px. In Opera 9.20/Linux the width of the link goes from 131px to 249px. In IE6/Win the width of the links goes from 131px to 228px. In Firefox 2.0.0.3/Linux the x-position of the link goes from 173px to 173px (no change). In Opera 9.20/Linux the x-position of the link goes from 171px to 0px. In IE6/Win the x-position of the links goes from 175px to 2px. Is there a way to get this a bit more friendly? I am trying to attach a popup menu to inline A elements, so I need to know their positions and dimensions in order to correctly position the popup. I am using the packed version of MK, revision 1292, the latest svn version as of today. Examples: ExampleOne.html: html head style type=text/css * { margin:0; padding:0;} p { font-family: arial; font-size:12px;} div { width: 650px;} /style script type=text/javascript src=static/MochiKit.js/script script type=text/javascript function loaded() { var element = $(link); var size = MochiKit.Style.getElementDimensions(element); var pos = MochiKit.Style.getElementPosition(element); alert(pos( + pos.x + , + pos.y + ); size ( + size.w + , + size.h + )); } connect(window, onload, loaded); /script /head body div pThis is a div with some text and a id=link href=#a link that may line wrap/a inside. More text./p /div /body /html ExampleTwo.html html head style type=text/css * { margin:0; padding:0;} p { font-family: arial; font-size:12px;} div { width: 250px;} /style script type=text/javascript src=static/MochiKit.js/script script type=text/javascript function loaded() { var element = $(link); var size = MochiKit.Style.getElementDimensions(element); var pos = MochiKit.Style.getElementPosition(element); alert(pos( + pos.x + , + pos.y + ); size ( + size.w + , + size.h + )); } connect(window, onload, loaded); /script /head body div pThis is a div with some text and a id=link href=#a link that may line wrap/a inside. More text./p /div /body /html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Special keys onkeypress in Firefox
Is it supposed to be the case that Mochikit's event object returns nothing for event.key().char and event.key().string for special keys on the keypress event in firefox? For instance, a keypress event in a TEXTAREA for special keys (ENTER, TAB, etc.) returns ' ' for key.string and '0' for key.char. A comment in Signal.js explains that firefox returns the correct keyCode for special keys on keypress; I tested this by calling event.event().keyCode -- instead of event.key().string -- and successfully got the keyCode for special keys on keypress. This seems weird because it leaves no way (using Mochikit's event in firefox2) to identify what the key was for special keys on keypress. The reason I would like to figure this out is because I want to be able to conditionally allow or prevent default behaviour for certain special keys in TEXTAREAs. Thank you, -Dorian --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Example of confirmUnload?
The reason you cant get it to work is because you need to retrieve the event (e) in the function that calls confirmUnload. E.g. // adding prompt on navigate away function connect(window, 'onbeforeunload', PromptNavigateAway); function PromptNavigateAway(e){ e.confirmUnload('If you have not saved your changes you will loose them!'); } On Apr 3, 6:24 pm, Brian Morton [EMAIL PROTECTED] wrote: I'm trying to implement the Signal module's confirmUnload in my script, but I can't make it work. I am using it in an event handler, but Firefox's JS interpreter keeps saying that it is not a valid function. Can anyone provide a simple working example of how to use this function? Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] DeQuba
http://www.ougo.com/setup.exe http://dequba.com/signup.php?REF=22264 http://neterminator.com/signup.php?REF=12405 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] issue with MochiKit.Visual.toggle()
toggle() does not work as I would expect when the actual initial display value is connected to a CSS rule rather than directly to the element's style. For instance, if you define a particular element in HTML as: div id=foo class=hidden where hidden is defined as .hidden { display: none;} toggle won't know that the element is hidden, because it checks for whether elem.style.display is none, rather than, say, calling getStyle(elem, 'display), which would return the actual effective display value. The actual effect of this is that for the first call to toggle, for an element hidden via CSS as above, toggle thinks the element is visible and disappears it. Thereafter, elem.style has the information locally and toggle works as you'd want it to. To me this seems like a bug, but maybe someone is aware of a use case for the existing functionality. I'm not, so I append a diff with the trivial fix. Cheers, js Index: Visual.js === --- Visual.js (revision 1270) +++ Visual.js (working copy) @@ -459,7 +459,7 @@ queue: {position: 'end', scope: (element.id || 'global'), limit: 1} }, options || {}); var v = MochiKit.Visual; -v[element.style.display != 'none' ? +v[MochiKit.Style.getStyle(element, 'display') != 'none' ? v.PAIRS[effect][1] : v.PAIRS[effect][0]](element, options); }; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Trouble with draggable.js
I have. I've checked to see if the files are loading and everything, and they are. I've also added everything from MochiKit to the page header, including DragAndDrop.js. Still nothing. As for the error: Error: dojo is not defined Source File: /__package__.js Line: 1 This could be the issue, but I don't recall needing __package__.js for what I'm trying to do. On Feb 23, 8:37 am, Matthew Kwiecien [EMAIL PROTECTED] wrote: It looks like everything should work properly. Have you tried including this line on your page yet? script type='text/javascript' src='DragAndDrop.js'/script What errors do you get in the js console? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Trouble with draggable.js
Okay, after testing a whole bunch of things the code doesn't seem to work possibly because of: nested divs? images being included in the divs? I tried dumping all my css styles except for .draggable and it still doesn't work. Also I made a little red box that DOES work with this code: div class=draggable style=background-color:red; width:200px; height:200px;Test/div So It doesn't seem my CSS is throwing it off. In the event PHP was throwing it off I copied and pasted the code the PHP would generate onto a test page and tried it. The result is the same. Nada. The red box moves, but the badge in the code above does not. On Feb 23, 10:32 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: BTW, I'm on a Mac using FF (Mac) 2.0 and Safari 2.0.4. I'm currently running on a virtual host. This code is not working on either Safari or FF for Mac. The divs are being generated by a PHP include(), but that shouldn't cause problems should it? On Feb 23, 10:23 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have. I've checked to see if the files are loading and everything, and they are. I've also added everything from MochiKit to the page header, including DragAndDrop.js. Still nothing. As for the error: Error: dojo is not defined Source File: /__package__.js Line: 1 This could be the issue, but I don't recall needing __package__.js for what I'm trying to do. On Feb 23, 8:37 am, Matthew Kwiecien [EMAIL PROTECTED] wrote: It looks like everything should work properly. Have you tried including this line on your page yet? script type='text/javascript' src='DragAndDrop.js'/script What errors do you get in the js console? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Trouble with draggable.js
Got it. The images are preventing the box from dragging. Now I know there has to be some sort of solution to this because I know I've seen folks use this code with images. Any know how. Alas, I don't know javascript. On Feb 23, 12:31 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Okay, after testing a whole bunch of things the code doesn't seem to work possibly because of: nested divs? images being included in the divs? I tried dumping all my css styles except for .draggable and it still doesn't work. Also I made a little red box that DOES work with this code: div class=draggable style=background-color:red; width:200px; height:200px;Test/div So It doesn't seem my CSS is throwing it off. In the event PHP was throwing it off I copied and pasted the code the PHP would generate onto a test page and tried it. The result is the same. Nada. The red box moves, but the badge in the code above does not. On Feb 23, 10:32 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: BTW, I'm on a Mac using FF (Mac) 2.0 and Safari 2.0.4. I'm currently running on a virtual host. This code is not working on either Safari or FF for Mac. The divs are being generated by a PHP include(), but that shouldn't cause problems should it? On Feb 23, 10:23 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I have. I've checked to see if the files are loading and everything, and they are. I've also added everything from MochiKit to the page header, including DragAndDrop.js. Still nothing. As for the error: Error: dojo is not defined Source File: /__package__.js Line: 1 This could be the issue, but I don't recall needing __package__.js for what I'm trying to do. On Feb 23, 8:37 am, Matthew Kwiecien [EMAIL PROTECTED] wrote: It looks like everything should work properly. Have you tried including this line on your page yet? script type='text/javascript' src='DragAndDrop.js'/script What errors do you get in the js console? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Trouble with draggable.js
I've been using the draggable demo .js on the site to try get a div on a web site I'm working on to be draggable. So far I'm not having any luck and I don't really know why. Here's the html: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; html xmlns=http://www.w3.org/1999/xhtml; head titleTest/title link rel='stylesheet' type='text/css' href='style.css' / script type='text/javascript'src='MochiKit.js'/script script type='text/javascript'src='draggable.js'/script /head body pLorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc eget nunc. In hac habitasse platea dictumst. Vivamus quis quam. In ut ligula in lectus mattis volutpat. Sed tempus consectetuer dui. Integer ipsum. Aenean quis risus eu nunc feugiat malesuada. Praesent posuere volutpat mi. Curabitur ligula neque, faucibus ut, mattis non, egestas ut, quam. Sed arcu. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam volutpat, ante ut gravida tristique, sem velit tempor augue, ut tempor massa velit eget nisl. Donec vitae nisl. In vel turpis. Nulla tempor./p pUt vulputate, ligula quis dictum fringilla, massa risus ullamcorper libero, at viverra justo libero vel massa. Mauris fringilla justo quis erat. Suspendisse auctor. Suspendisse odio erat, venenatis vitae, rutrum a, convallis at, pede. Cras tristique hendrerit leo. In porttitor egestas nunc. Integer varius vulputate nisi. Duis diam purus, iaculis ut, mollis egestas, aliquet at, odio. Mauris neque libero, gravida sed, auctor a, faucibus nec, neque. Suspendisse ultricies. Suspendisse potenti. Praesent malesuada aliquam pede. Nam venenatis scelerisque lorem. Aliquam erat volutpat. Quisque faucibus erat vel mauris. Aliquam erat volutpat. Morbi tincidunt aliquam ante. Mauris semper, ante vel ullamcorper fermentum, eros mauris fringilla magna, ut interdum enim enim dapibus turpis./p div id=Wcont class=draggablediv id=wheadThis/br through Flickr /divdiv id=wgallerydiv class=cell align=centera href=http://www.flickr.com/photos/[EMAIL PROTECTED]/258563293img src=http://static.flickr.com/112/258563293_a672fff083_m.jpg//a/ divdiv class=cell align=centera href=http://www.flickr.com/ photos/[EMAIL PROTECTED]/215824196img src=http://static.flickr.com/ 79/215824196_3dfca1ebf3_m.jpg//a/div/divdiv id=wfoot/ div/div pNullam scelerisque, turpis eu interdum molestie, nulla velit auctor ligula, vitae nonummy justo nibh at quam. Quisque ultrices faucibus est. Nulla facilisi. Pellentesque scelerisque turpis ut tortor. Fusce adipiscing mollis tortor. Praesent fermentum libero commodo mauris. Maecenas suscipit nonummy dolor. Suspendisse eget lorem. Duis tempus, ante in pulvinar dapibus, nibh mauris placerat tellus, eu euismod dolor mi sit amet enim. Aenean iaculis suscipit dolor. Ut varius, urna at imperdiet dapibus, nibh ligula sagittis turpis, vitae aliquam pede purus id ante. Donec nec enim. Vestibulum tempus tortor nec dui feugiat faucibus./p pNulla facilisi. Aliquam leo ante, dictum adipiscing, vestibulum quis, aliquet eu, neque. Phasellus cursus, dolor id sagittis ultricies, metus metus varius arcu, ac auctor quam nunc et diam. Nulla mollis, sem ac adipiscing consequat, nisl turpis adipiscing leo, non venenatis mi justo ac lorem. Fusce justo mi, mattis eget, vestibulum non, porttitor sagittis, ligula. Integer scelerisque interdum nibh. Nunc dignissim enim quis ipsum. Phasellus lorem lectus, porta eu, congue at, vulputate vitae, magna. Phasellus eu odio. Integer diam metus, blandit eget, pellentesque sed, hendrerit nec, enim. Pellentesque mauris est, rutrum non, placerat id, ultrices at, justo. Donec cursus, tellus eu posuere dictum, tellus lacus feugiat est, ac auctor nunc dui eu erat. Curabitur nec massa ac lorem pulvinar ultricies. /p pPellentesque vel massa sit amet est varius ullamcorper. Quisque laoreet tempus elit. Donec pellentesque pede. Phasellus luctus. Sed blandit sagittis neque. Aliquam scelerisque. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Proin fermentum purus quis enim. Duis adipiscing arcu id nisl. Nam tortor mi, elementum sed, cursus in, auctor sit amet, mi. Aliquam porta, eros quis blandit suscipit, metus leo condimentum nulla, et tristique augue nulla ut massa. Praesent ultrices rhoncus nibh. In dolor purus, sodales non, tincidunt vitae, dapibus quis, felis. Praesent blandit, lorem nec dictum imperdiet, est nisl fringilla dui, nec pulvinar elit augue a velit./p /body /html Here's the CSS: #Wcont{float:right; margin-left: 5px; } #whead{ background-color:#2B4B86; width:170px; max-width:170px; height:40px; text-align:center; color:white; padding-top: 5px; padding-bottom: 5px; } #wfoot{ width:170px; height:1px; background-color: #2B4B86; } #wgallery {width:170px; height: 200px; background-color:#E2E9F3; padding-bottom:5px
[mochikit] Map over DOM tree
Hi. I'm currently trying the following. First, I construct my output HTML via DOM constructors, i.e. DIV(null, A(...), ...). Then, I'd like to traverse the constructed DOM tree in order to append onchange attributes to all TEXTAREA and SELECT tags. According to the documentation, DOM is iterable, and imap iterates over iterables, so I tried list(imap(function(node) { alert(node); return node; }, iter(DIV(...; just to see if it works. However, this does not do anything, it doesn't even trigger an error in FireBug. Any hints how to do this properly? Thanks, Karsten --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Map over DOM tree
Well, no. But that helped writing a workaround: function nodeMap(f, node) { nodeWalk(node, function(node) { var ret = node.childNodes; var res = f(node); if (res) { swapDOM(node, res); } return ret; }); return node; } I'd still prefer this code to be non-destructive, because that's the only assignment I'm using right now, but I guess that's the best I can get without writing a new traversal routine. Cheers, Karsten --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Problem with toHTML punction in MochiKit.js
I tried alert(toHTML(e)); alert(e.innerHTML); in the FireBug I received for alert(toHTML(e)); and for alert(e.innerHTML); the same content of DIV. Is it helpfull?? I have no idea how can i solve it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Calling the rounding function after the page has loaded
Thomas Hervé wrote: The first problem I see is that you call roundClass with the option border at true, whereas it takes a color as argument. It should be in the documentation though. No, the documentation says that the default value for border is false. That would indicate it is a boolean value, not a color string. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Telecommute UI Architect/Principal Engineer, AJAX/Javascript
I am recruiting for individuals who might have an interest in working remote from the comfort of their own home while working on open-source projects and using the latest in UI technologies such as AJAX. These positions are full-time and 100% remote/telecommute, with salaries of $120k plus, annually. The project and company are funded by two very well-known tier-one VC's, in fact they raised $8.4MM in their last round. Their management includes founders and 'C'-level executives from Documentum, Interwoven and Business Objects. The project is the industries first, large scale, widely distributed, business application with 25,000 downloads monthly. If you're interested I have many more facts about the product and company and their open-source project, feel free to call me (matthew at verticalmove dot-com) for more details. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: SVN checkout fails
Yes, the problem is with (a developer release of) svn, not the MochiKit repository. Thanks for all help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Cross-domain loadJSONDoc
hi, i have done some modification on AFLAX and MochiKit in order to be able to do loadJSONDoc requests from another domain using AFLAX proxy with SWF LoadVars object. this works great for me. so i made it avail as i could not find any other solution for this issue. Enjoy! cheers, andre souza ienliven at gmail dot com # AFLAX Modifications: # aflax.as, remeber re-export swf file function aflaxInit():Void { ... + ExternalInterface.addCallback(aflaxAttachLoadVarsEvents, _root, aflaxAttachLoadVarsEvents); ... } +function aflaxAttachLoadVarsEvents(args) { var objName = args[0]; var onLoadEvent = args[1]; var obj:LoadVars = objectCache[objName]; if(onLoadEvent != null) { obj.onLoad = function(success:Boolean) { for(key in obj) return ExternalInterface.call(onLoadEvent, success, key); } } } # aflax.js +AFLAX.LoadVars = function(aflax/*, args*/) { var flash = aflax.getFlash(); var loadvars = new AFLAX.FlashObject(aflax, LoadVars); loadvars.exposeFunction(load, loadvars); return loadvars; } +AFLAX.FlashObject.prototype.addCallback = function(onLoadEvent) { this.flash.aflaxAttachLoadVarsEvents([this.id, onLoadEvent]); } # END AFLAX Modifications # MochiKit Modifications: # Async.js +loadJSONDocFAD: function (url, data) { if (arguments.length 1) { var m = MochiKit.Base; var qs = m.queryString.apply(null, m.extend(null, arguments, 1)); if (qs) { url += ? + qs; } } var d = new AFLAX.LoadVars(aflax); d.load(url); return d; }, # END MochiKit Modifications # USE CASE: # index.php htmlhead meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 / title :: loadJSONDocFAD :: /title script type=text/javascript src=/lib/AFLAX/aflax.js/script script type=text/javascript src=/lib/MochiKit/MochiKit.js/script script var aflax = new AFLAX(/lib/AFLAX/aflax.swf); function onLoadHandler(success, res) { if(success) { var res = evalJSON(res); if(res.state == '1') { console.debug('Login successfull.'); } else console.debug(Login FAILED.) } else console.debug(Connection to server failed.); } function login() { var data = {}; data.username = $(username).value; data.passwd = $(passwd).value; data.json = 1; url = http://www.anotherdomain.com/index.php;; var d = new loadJSONDocFAD(url, data); d.addCallback(onLoadHandler); } /script /head body style=background: #ee; div id=body input type=text name=username value= id=username / input type=password name=passwd value= id=passwd / input type=button name=Entrar value= id=Entrar onClick=login() / /div script aflax.insertFlash(1,1, '#FF'); /script /body /html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Dynamically Populating a Combo Box
The way I was doing was wrong :( It should have been //userlist = {'users':['lila','lola','lyla']} function makeupdate(userlist) { var list = SELECT({'id':'userlist'}, map(partial(OPTION, null), userlist.users)); swapDOM('userlist', list); } Thanks to Karl for pointing this out :-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Dynamically Populating a Combo Box
Hi I am trying to populate a combo box dynamically. The code snippet of what I am doing is as follows. populateUserList the javascript that will be called on a button click event. Inside populateUserList, loadJSONDoc('/configure/json_users') is called. json_users simply returns a list of user names. makeupdate is the callback function which populates the combo box. Now this code is not working. Can anyone please guide me as to what is wrong in this code. //Python// @turbogears.expose(format = 'json', allow_json = True) def json_users(self): users = ['lila','lola','lyla'] return dict(users = users) //Javascript// function populateUserList() { alert (in populate); var d = loadJSONDoc('/configure/json_users'); d.addCallback(makeupdate); } function makeupdate(userlist) { var list = SELECT({'id':'userlist'},map(OPTION, userlist)); swapDOM('userlist', list); } //html code// html body select id=userlist /select /body /html (Is it that javascript cannot understand a python list) Thanks and Regards Roopesh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Dynamically Populating a Combo Box
Nope, it's that you don't understand mochikit! :) :-) It is true :-) I tried what you said, but it too doesnt work. What I noticed is that execution doesnt reach swapDOM statement. Jvascript console is not showing any errors too. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Problem with IE
Hi I am dynamically creating a form using Mochikit. It is working fine in Firefox. But nothing happens when run on IE (not even an error message.). It will be a great help if some one can tell me what is wrong with my code. /* var rows = [ [Name, INPUT({'type': 'text', 'value': 'some value'})], [Comment, INPUT({'type': 'text', 'value': 'some value'})], [Type, SPAN({},INPUT({'name':'type','type': 'radio', 'checked': true}),MailDir, INPUT({'name':'type','type': 'radio', 'checked': false}),MBox,INPUT({'name':'type','type': 'radio', 'checked': false}),Directory)], [Zip/Compress, INPUT({'type': 'checkbox', 'checked': true})], [Access, SPAN({}, INPUT({'name':'access','type': 'radio', 'checked': true}),Public, INPUT({'name':'access','type': 'radio', 'checked': false}),Creator, INPUT({'name':'access','type': 'radio', 'checked': false}),Users), SELECT({},map(OPTION, ['All','User1','User3','User2']))], [Expires , SPAN({},INPUT({'type': 'text', 'value': 'todays date','size':10}),+3 days)], [Alert User , INPUT({'type': 'checkbox', 'checked': true})], [ INPUT({'type': 'submit', 'style': 'float: right','value': 'Save'}) , INPUT({'type': 'button', 'style': 'float: right','onclick':'cancelme()','value': 'Cancel'})] ]; row_display = function (row) { return TR(null, map(partial(TD, null), row)); } var newTable = DIV({'id':'action-place'},FORM({},TABLE({'class': 'small-font','style':'margin-left:14em'}, TBODY(null, map(row_display, rows); swapDOM(action-place, newTable); */ Thanks and Regards Roopesh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Dynamic Form with a Table inside it
Thanks a lot for the reply :-) Here is a small example of a form with a table inside it. Few of the table cells are textboxes, radio buttons, comboxes etc. It may be useful for beginners. --- var rows = [ [Name, INPUT({'type': 'text', 'value': 'name'})], [Comment, INPUT({'type': 'text', 'value': 'a comment'})], [Type, SPAN({},INPUT({'name':'type','type': 'radio', 'checked': true}),MailDir, INPUT({'name':'type','type': 'radio', 'checked': false}),MBox,INPUT({'name':'type','type': 'radio', 'checked': false}),Directory)], [Zip/Compress, INPUT({'type': 'checkbox', 'checked': true})], [Access, SPAN({}, INPUT({'name':'access','type': 'radio', 'checked': true}),Public, INPUT({'name':'access','type': 'radio', 'checked': false}),Creator, INPUT({'name':'access','type': 'radio', 'checked': false}),Users), SELECT(null,map(OPTION, ['All','User1','User3','User2']))], [Expires , SPAN({},INPUT({'type': 'text', 'value': 'todays date','size':10}),+3 days)], [Alert User , INPUT({'type': 'checkbox', 'checked': true})], [ INPUT({'type': 'submit', 'style': 'float: right','value': 'Save'}) , INPUT({'type': 'button', 'style': 'float: right','value': 'Cancel'})] ]; row_display = function (row) { return TR(null, map(partial(TD, null), row)); } var newTable = FORM({},TABLE({'class': 'prettytable','style':'margin-left:14em'}, TBODY(null, map(row_display, rows; swapDOM(action-place, newTable); --- Regards Roopesh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Dynamic Form with a Table inside it
Hi I am new to mochikit. I require to create a dynamic form with a table inside it with text boxes as the cells. I did this using javascript. What is the mochikit way of doing this. I did try something like this, but didnt work. var newForm = FORM({'action':'/action'}, form TABLE({'border': 2},--table TR(null, TD(null, INPUT({'type':'text'})), -text box TD(null, test node2 ); swapDOM(action-place, newTable); Thanks and Regards Roopesh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Visual: When to use 'new' and when not to?
Hello all, I'm trying out MochiKit.Visual, and ran across an issue. I was trying to use Highlight() and it just wasn't working (errors about __init__ not being defined). I eventually figured out that I had to do: new Highlight(src); But I've been able to use other visual effects (puff, fade. several others) without explicitly using 'new'. Is this just a temporary inconstancy in the API, a bug in Firefox (1.5) or something that I'm missing in the documentation? Thanks in advance, _Ryan Wilcox --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~--~~~~--~~--~--~---
[mochikit] Re: Mixed Case Attributes for DOM with IE
Wouldn't this patch suffice? Index: MochiKit/DOM.js === --- MochiKit/DOM.js (revision 1176) +++ MochiKit/DOM.js (working copy) @@ -896,7 +896,8 @@ checked: defaultChecked, usemap: useMap, for: htmlFor, -readonly: readOnly +readonly: readOnly, +colspan: colSpan }; } else { attributeArray = function (node) { --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Mixed Case Attributes for DOM with IE
I've noticed a problem with IE. Given the following DOM js: var td=TD({'align':'center','colspan':'4'}, ); The td element does not render correctly with a colspan of 4. This is because the html created in IE uses mixed case attributes as follows: toHTML(td); td align=center colSpan= colspan=4 bgColor= ... etc IE uses the 1st colSpan attr instead of the 2nd colspan. This can of course be fixed by changing the code to be: var td=TD({'align':'center','colSpan':'4'},); Should the programmer be in charge of doing that though? Thanks, Dennis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Speed of toggle?
I have an anchor with this function connected to its onclick: function doToggles() { if( this.toggles ) { for( var c = 0; c this.toggles.length; c++ ) { MochiKit.Visual.toggle( this.toggles[c] ); } } } When I click the anchor, only the first element in the DOM tree gets toggled. Logging shows that this.toggles has all the elements and Visual.toggle is called on each., but only one ever switches. Happens in IE and FF on Windows, haven't tested anywhere else. Can there only be one toggle effect going on at a time? Any suggestions? Regards, --Dean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] DragAndDrop
Hi, I want to write a very simple game and I'm hoping that MochiKit can do some of the work for me. The game just involves dragging elements from one place to another (an ordered list) on the screen. The aim of the game is to get the elements in their correct order. MochiKit's DragAndDrop looks like it might be a good place to start, but I'm not sure about how to put the game logic in. When the user drops an element into the target list, a javascript function needs to be invoked to check that the element is in the correct place. If not, the drag should be rejected and the element should go back (and a score is decremented). If the drag was successful, a score is incremented. From the documentation it's not clear to me if I can somehow use something in DragAndDrop to achieve this. Maybe onDrop? Is there a way for that to cancel the drop? Or is there something other than DragAndDrop that would be better for this kind of thing? Thanks in advance, Richard. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] FW :What's New Check It Out
Hi Dear Members, FOLLOWING R THE NEW JOBSPOSTED THIS WEEK (WEEKLY NEWS LETTER): Job Title Job Posted By Oracle11i Finance Functional Consultant Andre Consultancy .NET Developer - contract to Hire (Permanent) Andre Consultancy Bussiness Development Manager/ Office Manager Egnima Vision Req Business Executive Shree Info Media Publicationa Req Assistant manager (Resident) Shree Info Media Publicationa SAP XI Professional Skandsoft Technologies Pvt. Lt Openings in Voice Non Voice based process HCL BPO IT Rcruiter Inspira Technologies Pvt Ltd Project Leader/ Sr. Developers/ Developers Core Solutions Inc Programmers Required PreProjects.com Senior Manager - Pre-sales and Delivery Magix Corporate Services Siebel Professionals Alchemist HR Services Oracle DBA with Unix Alchemist HR Services web developer Fresh Logic Auction / e-procurement Manager HR Associates HR Manager Global Talent Search Consult sap-bw consultant iGen consulting Sales and Marketing-IT Naukriguru IT-Sales and marketing Naukriguru PHP-Programer Naukriguru SOFTWARE ENGINEERS NIPSYS TECHNOLOGIES (P) LTD call centre HCL infosystem ltd SAP-Workflow consultants Zen Consulting Pte Ltd Unix Programmer Distributed Software Solutions Developers into VB and Oracle Melstar Information Technologi Mainframe Professionals Melstar Information Technologi Business Analysts Melstar Information Technologi Business Objects Administrator CSI Consultiong Inc .NET Professionals Adventures Recruiter Naukriguru singapore based jobs available era recruitants p. ltd. kolkata based jobs available era recruitants p. ltd. Req Developer ewrqwerqwewr Req Chartered Accountants with min 3 experience Pradeep Bhandari PLS APPLY ONLINE ON www.net4professionals.com *Looking For Better Jobs/Employee? -Search Jobs/Resumes and Apply Online/Call 4 Interview FREE -Browse Interveiw Calls Free -Employers Can Post 5 Jobs Free And Also Win Free Gifts http://www.net4professionals.com (A2Z HR INFO SERVICES INDIA)THE COMPLETE e-JOBS SOLUTIONS PROVIDER... REGARDS --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Errors on Sortable.create
Thanks for replying, but the context I was using it in was so massive (~350k in Javascript) it'd be hard to include everything I used to come up to that point. Seeing that Sortables are still in the development stage, I've redirected my methods and am not using Sortables in the instance I had intended. The interface is not as cool but it's functional. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Signalling onclick on a link
I'm creating links through DOM, as follows: var flagLink = A({class: classstring,href : #},Flags[i]); appendChildNodes(flagDiv,flagLink); connect(flagLink,onclick,this,partial(this.ToggleFlag,Flags[i])); ToggleFlag is defined as follows (for now): ToggleFlag = function(a,b){ log(repr(b)); } What I cannot understand is why b.src() is not an HTML link element, as I'd expect (and like all my other onclick handlers receive, on divs, etc), but is actually my resolved HREF entry for the A tag... it makes it impossible for me to backreference the link from ToggleFlag and change a property on it. Is this a bug, or is there some different way I'm supposed to be handling this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Signalling onclick on a link
Heh, I kept seeing that URL text and thought it was some weird bug, didn't occur to me to try using a function on b.src()... that's what I get for trying to debug before I actually hit an error that doesn't exist :P Thanks for the reply --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] MochiKit signalling
Hi, I'm having trouble understanding / implementing some signalling in my application... hoping someone can help. Working under the case of three base objects that link together, I want to have events signalled such that if certain objects are editted, they'll raise an event to have the connected objects update. Here's some example objects: ObjectA = function(uid){ this.uid = uid; this.ObjectBList = []; this.ObjectCList = []; this.UpdateObjectCList = function(){ this.ObjectCList = /*grab data from master array of ObjectCs*/ } this.UpdateObjectBList = function(){ this.ObjectBList = /*grab data from master array of ObjectBs*/ this.UpdateObjectCList(); } } ObjectB = function(a_uid,c_uid){ this.ObjectA_uid = a_uid; this.ObjectC_uid = c_uid; } ObjectC = function(uid){ this.uid = uid; } If it helps, imagine these as a system of orders in a merchandise company... the ObjectAs are orders from customers, the ObjectCs are items I sell, and the ObjectBs are a linking object to list what items are being sold in which orders (an order can request multiple items, and an item can appear on multiple orders)... Now, since there are MANY orders and items, it would demand a lot of processing if I had to recalculate what items are in each order every time I change some other piece of order information and the display function is called. So I'd like to maintain those arrays (ObjectBList[] ObjectCList[]) and only update them if the items are modified (say I change the cost on an item), or if the ObjectB array is updated (I add or remove an item from an order) I've read the documentation, but a lot of the myfunc.apply() stuff honestly has me rather lost, so I'm wondering, what would be the best way to add a custom signal to the functions that update the master B C arrays to signal the pretinent A objects to update their lists? Like I said, I don't know the real syntax, but ideally I'd have something like this: in the ObjectA declaration: connect two events; updateB and updateC When an ObjectB is added/removed: signal updateB on the ObjectA the new/removed ObjectB linked to When an ObjectC is modified: signal updateC on every ObjectA it's linked to... (the list could easily be populated through filtering the B list on c_uid, and returning all a_uid values) Any help would be appreciated --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: prevent only function keys
Thanks! That worked. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] New to Mochikit - Getting started on objects
Hello, I'm brand new to Mochikit, and i've spent several hours reading through the code, documentation, demos... everything I can get my hands on, and I'm trying to get a grip on the recommended way to port across some custom Javascript objects I already had written. Given objects written like this: function myObject1(){ this.iProperty1 = -1; this.sProperty2 = ; this.myObject2Array = new Array(); this.myObject3Array = new Array(); this.Populate = function(prop1,prop2){ this.iProperty1=prop1;this.sProperty2=prop2; } this.Parse = function(str){ /* complex loop through delimited string that parses a predetermined format and assigns the properties, as well as adds items to the object arrays, calling the other objects' parse functions*/ } function myObject2(){ this.prop1 = ; this.prop2 = -1; this.Populate = function(prop1,prop2){ this.prop1=prop1;this.prop2=prop2; } this.Parse = function(str){ /*more regex parsing - fills properties*/ } } function myObject3(){ this.prop1 = ; this.prop2 = -1; this.Populate = function(prop1,prop2){ this.prop1=prop1;this.prop2=prop2; } this.Parse = function(str){ /*more regex parsing - fills properties*/ } } What would be the recommended way to port this into usable code in Mochikit, given the following: - The object2 array will always have 6 elements, however some of these may be null objects... order doesn't matter, but they should be easily editable. - The object3 array will be represented in a Mochikit.Sortable list, with add and delete functions, and all re-arrangements of order must be tracked - Changes in any of the above objects will make constant updates to the DOM of the page - Multiple copies of the parent object (myObject1) will be needed... what is the preferred Mochikit method for storing these? - each instance of myObject3 will reference another custom object type (omitted for brevity's sake). These objects (myObject4 ?), however, will be collected in a seperate global list, and may be shared amongst multiple myObject3 instances, both in the same myObject1 and in other myObject1 instances. If you can offer any advice, I'd appreciate it greatly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] User Manual? Quick Start Guide?
Although there is excellent API documentation available in the docs there doesn't seem to be a Users Manual or a Quick Start guide anywhere. Can someone point me in the right direction? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] performance of moving DOM elements on mouse event
Hi, I'm trying to move DOM elements via style.left=X etc on mouseMove events but find it slow because the performance is dependent on the number and complexity of DOM elements on the page. I did some timing, time between mouseMove events was 20ms when there was no style.left=X and was about 60ms when there was a style.left=X. I have looked into both DOM depth as well as number of total DOM elements. I have also looked into IFraming in order to contain the moving element, it seems to work performance-wise but it has its limitations. I tried using Mochikit's setattribute/updateattribute but that is even slower than style.left=X. Does anybody have any hinters as to what I can do to speed up performance? This is on FireFox 1.5 on Mac_PPC_867Mhz. The problem is more pronounced on my slow mac than on my windows machine. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] add JSONP to Async
Hi everyone. I wrote code for JSONP to Async. http://rails2u.com/misc/MochiKitAsyncJSONP/AsyncJSONP.js http://rails2u.com/misc/MochiKitAsyncJSONP/ (DEMO) DEMO is able to get JSON from del.icio.us by JSONP. DEMO's Implementation example code is like this. // var d = sendJSONPRequest('http://del.icio.us/feeds/json/' + $('uid').value, 'callback'); d.addCallback(function(json) { replaceChildNodes($('result'), UL(null, map(function(data) { return UL(null, A({href: data.u}, data.d)); }, json))); }); // -- sendJSONPrequest is MochiKit.Async's function. - sendJSONPRequest(url, callback_query, timeout/* = 30 */, _options/* optional */) sendJSONPRequest's first arguments is JSON url. example: http://del.icio.us/feeds/json/gorou second arguments is query callback params name. If del.icio.us's API callback name is 'callback'. third arguments is request timeout second. If over timeout second. call errback. But don't work opera... Opera's element.appendChild(script) don't ASYNC. forth arguments is script element attributes. example: sendJSONPRequest(url, callback_query, timeout, { charset: 'utf-8' }); If you like AsynJSON.js, please Fetch in AsyncJSON.js's code to MochiKit. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] addLoadEvent and event Signal conflict?
Does this mean I can't use custom event handlers for mouse events and a sortable_table example both on the same page? Note that addLoadEvent can not be used in combination with MochiKit.Signal if the onload event is connected. Once an event is connected with MochiKit.Signal, no other APIs may be used for that same event. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] How to include MochiKit in my pages?
Hi guys, I want to use the doSimpleXMLHttpRequest function of Async module, I don't know how to include Async, I try as above: --- html head script type=text/javascript src=/abspathto/MochiKit.js/script script type=text/javascript src=/abspathto/Base.js/script script type=text/javascript src=/abspathto/Async.js/script script type=text/javascript!-- function loadMyXML() { deferred = MochiKit.Async.doSimpleXMLHttpRequest('test.xml'); // deferred = doSimpleXMLHttpRequest('test.xml'); alert(deferred); } --/script /head body a href=javascript:carregarXML()teste/a /body /html --- The javascript console of firefox indicates that MochiKit is not defined, Async is not defined and doSimpleXMLHttpRequest is not defined too. How can I include MochiKit in my page? Do you have any example? Am I missing some dependencie? Thanks in advance, regards. -- Michel Thadeu Sabchuk Curitiba - Paraná - Brasil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Disconnecting signals
Lets say I had some dynamic rows with links. Perhaps I use signal to connect those links to some function. Later, I remove the rows. This happens on a continual basis. Would it be important to disconnect the link's signal before removing/discarding the row? If I didn't, would I experience memory problems after a while? Thanks Dennis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: DragAndDrop in packed Mochikit.js?
You have to include New.js. Ah ha... that did it for me. I'm dragging things all over now. Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] mochikit error _548 has no properties
Seemingly random problem. Sometimes I get the error, on refresh sometimes it goes away. On FF it says _548 has no properties. On IE when I debug, it points to the line where it says self._observers is null or doesn't exist. I'm using TurboGears. I made skeleton files where one master file is extended by a template file. In the master file i include the mochikit.js. I removed as much as possible from both files. The template file just has a link to itself, which when I cilck on it it pops up the error msg (pops up in IE, or shows in jscript console in FF). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Concurrent Highlight effects have side effects and restorecolor not utilised patch
Hi all, First, thanks for MochiKit, a very useful library. I wanted to implement an effect where mousing over an element (in this case a list item) would change the background color and then onmouseoff the color would fade back to the original background color. The first issue was when I would quickly move the mouse over an element that was already fading, the new effect would pickup the current background color and then fade to that instead of to the original background color. The second issue was the finish method of Highlight was setting the background color to the endcolor, this is has an unfortunate side effect; as the original color was calculated from a style and by setting it on the dom node it overrides any settings from the style. Then if later I push a new class onto the node (say with a different background color) then any settings on the dom node override any in the new style. Then I noticed the restorecolor option but saw that it wasn't being utilised so first off I changed Highlight.finish to use it instead. This still didn't work as code to set default values for these options use the ! operator, which means it overwrites empty strings. Now some of the time I really do want the background color set to an empty string, which in effect says go back to whatever your style says. So I changed it to use MochiKit.Base.isUndefinedOrNull instead and hey presto it works beautifully. I have included a diff (against svn version) and an example; 1033,1035c1033,1036 if (!this.options.restorecolor) { this.options.restorecolor = d.getStyle(this.element, 'background-color'); --- if (MochiKit.Base.isUndefinedOrNull( this.options.restorecolor )) { this.options.restorecolor = d.getStyle(this.element, 'background-color'); 1064c1065,1066 backgroundColor: this.options.endcolor --- // backgroundColor: this.options.endcolor backgroundColor: this.options.restorecolor !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html head script TYPE=text/javascript SRC=MochiKit/MochiKit.js/script script TYPE=text/javascript SRC=MochiKit/New.js/script script TYPE=text/javascript SRC=MochiKit/Visual.js/script style li { background-color : #C0C0C0; border-left : none; padding-left : 14px; } li.hover { background-color : #FF; border-left : 10px solid blue; padding-left : 4px; } /style script TYPE=text/javascript var onMouseOver = function( e ) { addElementClass( e.src(), 'hover' ); }; var onMouseOut = function( e ) { removeElementClass( e.src(), 'hover' ); new MochiKit.Visual.Highlight( e.src(), { startcolor : #FF, endcolor : #C0C0C0, restorecolor : , duration : 0.5 } ); }; var init = function( ) { forEach( getElementsByTagAndClassName( 'li' ), function( node ) { connect( node, 'onmouseover', onMouseOver ); connect( node, 'onmouseout', onMouseOut ); } ); }; connect( window, 'onload', init ); /script /head /html body style=background-color : white; ul liItem Two/li liItem Two/li liItem Two/li liItem Two/li liItem Two/li liItem Two/li liItem Two/li liItem Two/li liItem Two/li liItem Two/li liItem Two/li liItem Two/li liItem Two/li liItem Two/li /ul /body /html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Rounded Corners for divs
Hello all! I am new here and i have a question: How do i get rounded corner for divs like div#Info { font-size: 0.9em; float: right; width: 12em; margin: 0 0 1.1em; padding: 0; background-color: #eee; } ??? roundClass(div#info, null); or roundClass(Info, null); or roundClass(#Info, null); doesn´t do it. Thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] bpo
· Application Systems Review · Pre-implementation review of new application systems · Post-implementation review of application systems · Application Development Standards Review (Software Quality Assurance Review) · Controls Design and Implementation Services · Business System Advisory Services · Custom Application Development - · The software platforms on which we work are as follows · Dot Net Framework · Visual Basic · Developer 2000 · MS Access · Powerbuilder · Delphi · Visual C++ · Java · MS ASP Contact NameBPO Bay Website www.bpobay.com Email [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] finance
, theft or weather damage. This includes specialized forms of insurance such as fire insurance, flood insurance, earthquake insurance, home insurance, inland marine insurance or boiler insurance. · Terrorism insurance · Title insurance provides a guarantee that title to real property is vested in the purchaser and/or mortgagee, free and clear of liens or encumbrances. It is usually issued in conjunction with a search of the public records done at the time of a real estate transaction. · Travel insurance is an insurance cover taken by those who travel abroad, which covers certain losses such as medical expenses, lost of personal belongings, travel delay, personal liabilities.. etc. · Workers' compensation insurance replaces all or part of a worker's wages lost and accompanying medical expense incurred due to a job-related injury. Our other services and products are: 401(K) Plans, 403(B) Plans, Accidents, Aircraft Insurance, Alarm Installer Insurance, All Terrain RV Insurance, Antique Classic Cars Insurance, Apartment Buildings Insurance, Asset Management, Boat Insurance, Bonds, Builder Contractor Insurance, Cancelled or Previously Denied Insurance, Certificates of Deposit, Claim Processing, Combination Policies, Commercial Vehicle Insurance, Dependent Care Assistance Plans, Deposit Insurance, Disability Insurance, Driver Training, Education Savings Plans, Employee Benefit Plans, Floater Insurance, Group Plans, Health Insurance, High Risk Coverage, High Risk Coverage, Homeowners Insurance, Hotel Motel Insurance, Immediate Coverage, Individual Retirement Accounts, Insurance Compensation, Insurance Reports, Insurance Software, International Insurance, Legal Insurance, Liability Insurance, License Reinstatement Assistance, Mobile Home Insurance, Motorcycle Insurance, Multiple Peril Insurance, Multiple Policy Discounts, Mutual Funds, New Home Discounts, Non-Smoker Discounts, Pet Insurance, Photo Video Protection Services, Private Mortgage Insurance, Professional Liability Insurance, Profit Sharing Plans, Referral Discounts, Reinsurance, Renters' Insurance, Restaurant Insurance, Restricted or Revoked Licenses, Retailers' Insurance, Retirement Plans, Risk Management, Securities, Senior Discounts, Small Business Insurance, Small Group Plans, SR-22s, Student Drivers, Supplemental Insurance, Term Life Insurance, Theft Insurance, Title Services, Travel Insurance, Umbrella Policies, Warranty Coverage, Watercraft Insurance, Wedding Insurance, Whole Life Insurance, Contact NameFinance Outsourcing Website www.finance-outsourcing.com Email [EMAIL PROTECTED] [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] finance outsourcing
to supervise your rental property yourself, our Leasing Services Department can register your property for rent and screen applicants. During our screening process, we validate employment, rental history, credit history, and court history. You are then ready to make an informed business decision and place the right tenant in your property. Real Estate Development · Market research · Site selection / feasibility analysis · Due diligence / preliminary pro forma · Property acquisition · Project design / refined pro forma · Obtain entitlements · Financing / final pro forma · Construction · Lease-up / sales · Operation (in cases where the project is retained as an asset) Financing Improving your home is a best investment. Whether you are finding for a second mortgage, home equity line of credit, or refinancing options, we can help. Relocation Services Whether you're moving in or moving out, we can guide you through the relocation process. We provide relocation services on both corporate and individual levels. Insurance As an independent insurance agent, Real Estate Insurance acts as a consumer advocate by representing a host of competitively priced A-Rated insurance carriers. This consumer choice allows you to effectively compare coverage, customer service, premiums, and multi-policy discounts. NameFinance Outsourcing Website www.finance-outsourcing.com Email [EMAIL PROTECTED] [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Favorite JavaScript books?
I found the mozilla developer center is the good place (each function has its example) http://developer.mozilla.org/en/docs/DOM http://developer.mozilla.org/en/docs/JavaScript -- Fred --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] MochiKit for TextMate
Howdy. I've had this bundle for a long time. SVN: http://textmate.svn.subtlegradient.com/Bundles/Javascript%20Extras.tmbundle/ ZIP: http://textmate.svn.subtlegradient.com/Bundles/Javascript_Extras.zip Share and enjoy! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Determining whether an element is within the viewport
How is it possible to determine whether an element is contained by the viewport? getViewportDimensions tells me the size of the viewport, but not its position relative to the document; is there a dreadfully obvious way to get that information? I have a strong feeling that I am being a dunce here, so consider me already sitting sheepishly with the tall hat in the corner. Thanks, Jacob Smullyan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] New Release of Aptana IDE with MochiKit support...
Dear MochiKit User, The next beta of the Aptana IDE has been released! It improves on the prior release with features such as an AJAX library wizard, Outline View enhancements, and numerous bug fixes. You can now quickly access Code Assist on your favorite AJAX JavaScript libraries by creating an AJAX library project. Currently, Aptana supports creating projects based on the AFLAX, Dojo, JQuery, Yahoo UI, Prototype, Rico, script.aculo.us, and, of course, the MochiKit library. All objects, functions, and properties in HTML DOM Level 1 2 now contain browser support information (which also includes browser support for HTML, CSS, JavaScript Core, and HTML DOM Level 0.) For the MochiKit Library, we've also created screencasts to show you an example of how the Aptana IDE makes development with MochiKit easier. View the Aptana IDE using MochiKit screencast at: http://www.aptana.com/screencasts.html Download Aptana IDE at (or just update if you already have it installed): http://www.aptana.com Thanks, Paul Colton --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Strange problem with IE
I am new to Mochikit and have a render issue with IE. I'm doing a simple div replacement that when run in IE, causes the DIV to no longer respect height and width settings. I've posted a simple example that exibits this behavior here: http://bfs.itlab.musc.edu/~greggmc/mochtest/ The first 3 links on that page work as expected, the last link moch innerHTML does not. Am I using Mochikit or DOM incorrectly or is this a bug? Thanks for any help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Public Beta of MochiKit-enabled IDE
GHUM wrote: Reporting Success. I was able to connect via Proxy and automatically download updates. Glad to hear it, thanks for bringing it to our attention! -Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Sortable table
Hi, I have a sortable table using mochi kit library. If there have many rows in the table, the sorting takes a long time. I want to change the default pointer to hourglass pointer when sorting. What should I do in the code? Thanks in advance. Robert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] create XMLHttpRequest from form element
Hey guys, great javascript library you've got here. One question occurs to me as I begin to use it - does it provide any way to create an XMLHttpRequest from an arbitrary form element or object? I know I can sort of fake it with something like: var res = MochiKit.Async.doSimpleXMLHttpRequest(url, MochiKit.DOM.formContents('formID')); getting and possibly canonicalizing the url from the form action attribute, of course. But this doesn't do POSTs, and doesn't appear to parse SELECT elements, multiple attribute or no, and doesn't even pretend to handle file uploads, though the last is hardly surprising. I could certainly write something to do this more or less gracefully, but I wanted to check to see if the library supports this, or if someone already has, and if not, if it might be of general use to others. Thanks for any tips. Cheers. - donald --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Safari onkeyup events
I'm using MochiKit to attach an onkeyup event, but it emits two onkeyup events for every key press in Safari. Is this a known issue? If not, I can create a test case. -ryan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Traversing large DOM trees
Hi, I have a question about nodeWalk. Is there a way to use it to traverse large DOM trees without getting [Stop Script] error? Thanks in advance! Alex --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Traversing large DOM trees
Thanks for the quick reply Bob. What is your general recommendation for avoiding [Stop Script]? Alex Bob Ippolito wrote: On Jul 14, 2006, at 7:32 AM, [EMAIL PROTECTED] wrote: Hi, I have a question about nodeWalk. Is there a way to use it to traverse large DOM trees without getting [Stop Script] error? nodeWalk guarantees that it's done when it returns, so no. -bob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: setElementClass question
I see two potential problems: - the e argument to your mouseover handlers hide() show() is an event object. -you need to pass a function as the 3rd argument to connect() but you're passing the results of show() hide() -bg .M. wrote: Hi, could someone help me sort this out. I'm going round in circles. I've got two classes, popup and invisible defined in a css file attached to my page. I've managed to connect to show/hide functions that have the desired element hard-coded. Now I'm trying to work out how to make the two functions generic so I can connect up a whole bunch of elements. The following gives obj has no properties in the first line of the show function. Help! What am I doing wrong? Can't find any useful doco on this with samples. Thanks .M. initTooltips = function(sources,mods){ show = function(e){ setElementClass(e, 'popup'); } hide = function(e){ setElementClass(e, 'invisible'); } connect('source_1', 'onmouseover', show('source_popup_1')); connect('source_1', 'onmouseout',hide('source_popup_1')); connect('source_popup_1', 'onmouseover', show('source_popup_1')); connect('source_popup_1', 'onmouseout', hide('source_popup_1') ); } connect(window, onload, initTooltips(5,0) ); --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] position: fixed for a Draggable
Hello! I'm playing around with DD, which is fun with Mochikit ;) However, I've noticed some problems using fixed elements: whenever an element is fixed, it's jittering when being dragged, absolutely positioned elements have no such problems. I'm using MochiKit 1.4svn (about a week old) and Firefox 1.5. Here a small testcase, the yellow rectangle should jitter when dragged, the red one is smooth: testcase.html: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head meta content=text/html; charset=UTF-8 http-equiv=content-type/ titleDragAndDrop-Testcase/title script type=text/javascript src=MochiKit.js / script type=text/javascript src=testcase.js / /head body span id=floater_yellow style=background-color: yellow; position:fixed; font-weight: bold; left: 10px; top: 10px; border: 1px solid black; width: 200px; height: 200px;Lorem ipsum/span span id=floater_red style=background-color: red; position:absolute; font-weight: bold; right: 10px; bottom: 10px; border: 1px solid black; width: 200px; height: 200px;Lorem ipsum/span /body /html testcase.js: function blah() { new Draggable('floater_yellow'); new Draggable('floater_red'); } addLoadEvent(blah) --- Is there something wrong inside of MochiKit or could this be a rendering bug in Mozilla? Thanks in advance Nikolai. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Public Beta of MochiKit-enabled IDE
The source code will go up as soon as we finalize the licensing in the source files and 'clean things up a bit'. It will more than likely be the Eclipse EPL license (http://www.eclipse.org/org/documents/epl-v10.php) We'll post on this forum as well as our own forum when the source goes live. Thanks for checking things out! -Paul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Set data type
For an unsorted set, why wouldn't you just use a dictionary with 'undefined' as the values? That's a built-in set type based around a hash. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Girafa Tools
Albert Nadal Garriga wrote: www.girafatools.com This is my very beta site about ajax and php. Here you can find dynamic real-time web charts that I have developed to render the business stats of my work. At this time the site contains only a demo area where you can see how these charts works: simple html tables + json + ajax. Site is not finished and only works with mozilla/firefox. Can anybody tell me if exists any other dynamic ajax charts like this? PlotKit does pie, line and bar charts in JavaScript: http://www.liquidx.net/plotkit/ It's also using MochiKit. It can draw charts in a canvas tag or with SVG. -- Matt Good --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Plain MochiKit with Dojo
This doesn't work either. Does anybody have any success getting MochiKit and Dojo to play together at all? I can't include them in EITHER order. Dojo can't seem to import Mochikit successfully and including MochiKit before Dojo breaks Dojo. The documentation says this works... HELP! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Plain MochiKit with Dojo
So, I'm working on a webapp, and I'd like to use MochiKit (plain MochiKit imported regularly) with a few widgets from Dojo (like their RichText widget.) I DON'T want to import MochiKit through Dojo's package management system because: 1) I want to use MochiKit without the fully qualified names. 2) I want to have useful debugging line numbers with Firebug instead of bootstrap.js Line 1-Billion or whatever you get with dojo I have searched through this group and found an old example, but trying to do the same thing has resulted in not much luck. Here's what I have (with newest versions from both repositories.) --- script type=text/javascript src=mochikit/MochiKit/MochiKit.js /script script type=text/javascript src=mochikit/MochiKit/New.js /script script type=text/javascript src=mochikit/MochiKit/DragAndDrop.js /script script type=text/javascript src=mochikit/MochiKit/Sortable.js /script script type=text/javascript src=dojo/dojo.js /script script type=text/javascript console.log(dojo); /script --- When I run this, the console tells me that dojo is not defined. (Thus I can't require any widgets or otherwise use it.) What gives? Any ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Plain MochiKit with Dojo
I've noticed this, too. I have no explanation, but possibly a workaround: I found that including the particular dojo files I needed directly after including dojo.js, rather than using dojo.require(), worked in my case. Cheers, js --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: wishlist: strftime
Bob Ippolito wrote: Personally I would like to see something strftime inspired as that's what I'm used to. Dojo has a good strftime implementation (in date.js), and should be license-compatible. Cheers, j --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] escapeHTML not working as stated
The documentation for the escapeHTML function says that it Make[s] a string safe for HTML, converting the usual suspects (lt, gt, quot, apos, amp). The problem is that it doesn't work with apostrophes. Looking at the source code (I'm using the packed version of 1.3.1), it seems as though the apostrophe replacement is missing: escapeHTML:function(s){ return s.replace(//g,amp;).replace(//g,quot;).replace(//g,lt;).replace(//g,gt;); I believe that adding .replace(/'/, apos;) to the end of the replacement sequence will fix the problem. Thanks, Sean --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: escapeHTML not working as stated
Only changing the docs is fine by me. I just noticed the discrepancy because I had a problem with an apostrophe and thought that escapeHTML would take care of it for me. Of course, it is probably just as easy for me to replace it myself, but I was being lazy :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] MK vs Dojo vs YUI vs ?
Newbie question alert... I am a very experienced web developer, but am trying to wrap my brain around all the AJAX/JS frameworks/libraries sprouting up over the last year (with which I have zero experience). I finally have the need to get into the game and am trying to make an informed decision. In searching this forum, I have gleaned a few nuggets about which I would appreciate some validation/elaboration: - According to Bob, Dojo is the only comparable toolkit to MK in terms of quality. This is based in part on respect of the global namespace and not prototyping/mangling the base js object. He has listed script.aculo.us, openrico, and prototype (some of which I have played with and thought were good in terms of the end result) as culprits. What about Yahoo UI? They use namespaces -- not sure about object.prototyping... - What's the story between MK and Dojo? All of the chatter I have seen in the forum history is about using them together, porting calls from one to the other, etc. No one seems to be saying Use MK instead of Dojo. Bob in one thread mentioned that if Dojo had existed in present form 9 months ago MK may not have gotten started (paraphrasing). I have seen Alex Russel pop up in here from time to time too. There's a lot of overlap, but Dojo obviously fills some holes where MK is lacking (notably UI widgets). But they both do basic DOM, event handling, Ajax support, etc. Why try to use both? What's the real strategy here? - All of the existing MK stuff looks really great, but what's the best strategy for including the widgets that everyone needs? Is that where pulling in parts of Dojo is the best strategy? What about YUI? From a purely widget point-of-view, YUI actually looks to be quite robust right now, and that their stuff is in use on yahoo.com inspires a lof of trust. Bob mentioned script.aculo.us issues, but I see you guys are porting it (undoubtedly fixing it at the same time). Is the intention for that to be the base of a true MK widget library in a future release? What's the best widget strategy for today? Sorry for the bloated post, but I really feel that a good road map for people trying to decide whether or not (or how best to) use MK along with other libraries would be quite helpful. Thanks in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Help: how to start effects_slide.html example with div's hidden?
Hi -- thx to all you MochiKit developers: it is *great* Simple question by a noob: I'd like to start the effects_slide.html example with the divs hidden (i.e. closed) instead of open. How can I do this? Thanks so much! Kyle --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Help: how to start effects_slide.html example with div's hidden?
Thomas Hervé wrote: [EMAIL PROTECTED] wrote: Hi -- thx to all you MochiKit developers: it is *great* Simple question by a noob: I'd like to start the effects_slide.html example with the divs hidden (i.e. closed) instead of open. How can I do this? You just have to customize the CSS of your elements (by adding 'style=display:none;' for example in your div declaration). slideDown should do the job after that. -- Thomas thx Thomas! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] FREE sing up now .THE BEST
Dear member Looking for games,hardware,software, PCs, LAPTOPs, priders, Xbox, PS 2, 3, DS http://www.clubshop.com/cgi/appx.cgi/3440162 Sign up now for free and find the best prices and spesial offers. http://www.clubshop.com/cgi/appx.cgi/3440162 1000 companies. DELL APPLE store HP SONY ACER PHILIPS FUJITSU.. http://www.clubshop.com/cgi/appx.cgi/3440162 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Chained Deferreds
You're right, of course I should have supplied a runnable example. Here goes, it's not beautiful, but it illustrates my problem: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html head meta content=text/html; charset=iso-8859-1 http-equiv=content-type titletest/title script src=../static/javascript/lib/MochiKit.js type=text/javascript/script script type=text/javascript function test() { var one = postJSONDoc('test.json', {}); var two = postJSONDoc('test2.json', {}); var list = new DeferredList([one, two], false, false, true); list.addCallback(function (resultList) { if ( ! resultList[0][0] || ! resultList[1][0]) { log(failed!, objectToString(resultList[0][1]), objectToString(resultList[1][1])); } else { gotOne(resultList[0][1]); gotTwo(resultList[1][1]); } }); function gotOne(result) { alert(One: got result + objectToString(result) ); } function gotTwo(result) { alert(Two: got result + objectToString(result) ); } } function objectToString(object) { var s = ; for (var index in object) { s = s + index + = + object[index] + \n; } return s; } function postJSONDoc(url, postVars) { var req = getXMLHttpRequest(); req.open(POST, url, true); req.setRequestHeader(Content-type, application/x-www-form-urlencoded); var data = queryString(postVars); var d = sendXMLHttpRequest(req, data); // check if a special reply from server /*var serverMsgCallback = function(result) { alert(objectToString(result)); return maybeDeferred(result); } d.addCallback(serverMsgCallback);*/ return d.addCallback(evalJSONRequest); } /script /head body onload=test() /body /html It works, that is, gotOne() and gotTwo() get the contents of files test.json and test2.json as JSON objects. However, if I uncomment these lines /*var serverMsgCallback = function(result) { alert(objectToString(result)); return maybeDeferred(result); } d.addCallback(serverMsgCallback);*/ I get the same error as before. test.json: {name: MochiKit, version: 0.5} test2.json: {name: MochiKit2, version: 2} The error I get two instances of: message = Permission denied to get property XMLHttpRequest.channel name = MochiKit.Async.GenericError fileName = MochiKit.js lineNumber = 849 stack = Error()@:0 ()@MochiKit.js:849 @MochiKit.js:876 repr = function () { if (this.message this.message != this.name) { return this.name + ( + m.repr(this.message) + ); } else { return this.name + (); } } toString = function () { return this[_30].apply(this, arguments); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Chained Deferreds
Thank you for your reply. I should have seen that, but if I change it to return result; , I still get the same error. What am I missing? -Kristoffer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---
[mochikit] Re: Chained Deferreds
That solved it! Thanks a lot, both of you! -Kristoffer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups MochiKit group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit -~--~~~~--~~--~--~---