From john at jwarner.com Tue Oct 7 17:02:14 2008 From: john at jwarner.com (John Warner) Date: Tue, 7 Oct 2008 18:02:14 -0400 Subject: [Javascript] OT: Test In-Reply-To: <48CA75A9.2030605@internetique.com> References: <48C6DF3A.3030403@internetique.com> <48CA75A9.2030605@internetique.com> Message-ID: <05cf01c928c8$5b681d90$123858b0$@com> It has been almost a month since the last time I received a post on the list so just checking. John Warner From Conleyj at kubota-kma.com Wed Oct 15 13:26:59 2008 From: Conleyj at kubota-kma.com (James Conley) Date: Wed, 15 Oct 2008 14:26:59 -0400 Subject: [Javascript] OT: Test In-Reply-To: <05cf01c928c8$5b681d90$123858b0$@com> References: <48C6DF3A.3030403@internetique.com> <48CA75A9.2030605@internetique.com> <05cf01c928c8$5b681d90$123858b0$@com> Message-ID: Everyone has moved to using web-forums or replying to blog postings. It's a sad day for email-driven lists. Especially sad since the advent of being able to get/send email on just about any cellphone with the Gmail mobile app. Lists should be growing instead of shrinking. James C. -----Original Message----- From: javascript-bounces at lists.evolt.org [mailto:javascript-bounces at lists.evolt.org] On Behalf Of John Warner Sent: Tuesday, October 07, 2008 06:02 PM To: 'JavaScript List' Subject: [Javascript] OT: Test It has been almost a month since the last time I received a post on the list so just checking. John Warner _______________________________________________ Javascript mailing list Javascript at lists.evolt.org http://lists.evolt.org/mailman/listinfo/javascript From noah at onemorebug.com Wed Oct 15 16:37:57 2008 From: noah at onemorebug.com (Noah Sussman) Date: Wed, 15 Oct 2008 17:37:57 -0400 Subject: [Javascript] OT: Test In-Reply-To: References: <48C6DF3A.3030403@internetique.com> <48CA75A9.2030605@internetique.com> <05cf01c928c8$5b681d90$123858b0$@com> Message-ID: On Wed, Oct 15, 2008 at 2:26 PM, James Conley wrote: > Everyone has moved to using web-forums or replying to blog postings. > It's a sad day for email-driven lists. A friend just pointed me to the very active JavaScript IRC channel on Freenode. Sign on to chat.us.freenode.net and join the ##javascript room. My handle on there is n_s, feel free to say hi :) Also, the comp.lang.javascript news group is still alive. You can access it on the web through Google groups: http://groups.google.com/group/comp.lang.javascript From paul at juniperwebcraft.com Wed Oct 15 17:13:35 2008 From: paul at juniperwebcraft.com (Paul Novitski) Date: Wed, 15 Oct 2008 15:13:35 -0700 Subject: [Javascript] OT: Test In-Reply-To: <6909507.1224096172530.JavaMail.root@m01> References: <48C6DF3A.3030403@internetique.com> <48CA75A9.2030605@internetique.com> <05cf01c928c8$5b681d90$123858b0$@com> <6909507.1224096172530.JavaMail.root@m01> Message-ID: At 10/15/2008 11:26 AM, James Conley wrote: >Everyone has moved to using web-forums or replying to blog postings. >It's a sad day for email-driven lists. Especially sad since the advent >of being able to get/send email on just about any cellphone with the >Gmail mobile app. Lists should be growing instead of shrinking. Speaking just for myself, I haven't gone anywhere. This is still the best source of interactive JavaScript advice I know of. It would be interesting to learn if the membership of this list has shrunk, or merely the activity of late. I haven't been posting here myself much this past year because I've had twin babies on my hands; 139% of my time is taken up with fathering and earning a living; luxury activities such as sleeping will have to wait. I've unsubscribed (temporarily, I assume) from all dozen or so listserves I've belonged to -- except this one. And JavaScript is hardly my main interest. I think one reason I like this list is that the traffic is fairly light and the quality high. My main PHP list has dozens of posts an hour and many of them are dross, either off-topic, redundant, or trivially argumentative. It was a chore to sift through it in the best of times, impossible now. One thing I miss here in particular is solving regular expression problems and the contributions thereto by Shawn Milo. Regards, Paul __________________________ Paul Novitski Juniper Webcraft Ltd. http://juniperwebcraft.com From mdougherty at pbp.com Wed Oct 15 17:19:07 2008 From: mdougherty at pbp.com (Mike Dougherty) Date: Wed, 15 Oct 2008 18:19:07 -0400 Subject: [Javascript] OT: Test In-Reply-To: References: <48C6DF3A.3030403@internetique.com> <48CA75A9.2030605@internetique.com> <05cf01c928c8$5b681d90$123858b0$@com> <6909507.1224096172530.JavaMail.root@m01> Message-ID: <59bedf280810151519l6c514805ia50b8866612efa00@mail.gmail.com> On Wed, Oct 15, 2008 at 6:13 PM, Paul Novitski wrote: > I think one reason I like this list is that the traffic is fairly > light and the quality high. My main PHP list has dozens of posts an > hour and many of them are dross, either off-topic, redundant, or > trivially argumentative. It was a chore to sift through it in the > best of times, impossible now. I second that. > One thing I miss here in particular is solving regular expression > problems and the contributions thereto by Shawn Milo. I've been working with regex using a lamba expression for replacement values to parse mergecodes from a CMS-like html template. That the lamba expression is also a closure over a particular node in a linked/tree of nodes make for some interesting code. Q: "You can do all that in one statement?" A: "Yup." From paul at juniperwebcraft.com Thu Oct 16 00:00:15 2008 From: paul at juniperwebcraft.com (Paul Novitski) Date: Wed, 15 Oct 2008 22:00:15 -0700 Subject: [Javascript] Lambda calculus [WAS: OT: Test] In-Reply-To: <4402898.1224109281897.JavaMail.root@m01> References: <48C6DF3A.3030403@internetique.com> <48CA75A9.2030605@internetique.com> <05cf01c928c8$5b681d90$123858b0$@com> <6909507.1224096172530.JavaMail.root@m01> <4402898.1224109281897.JavaMail.root@m01> Message-ID: At 10/15/2008 03:19 PM, Mike Dougherty wrote: >I've been working with regex using a lamba expression for replacement >values to parse mergecodes from a CMS-like html template. That the >lamba expression is also a closure over a particular node in a >linked/tree of nodes make for some interesting code. Q: "You can do >all that in one statement?" A: "Yup." Sounds fascinating! http://en.wikipedia.org/wiki/Lambda_calculus There's an ECMAScript example here: http://en.wikipedia.org/wiki/Closure_(computer_science)#Closures_and_first-class_functions and this: The New Replace Method's Lambda Expression http://www.webreference.com/js/column26/lambda.html Can you show us some examples using JavaScript that you've written with an explanation of what they do? Cheers, Paul From mdougherty at pbp.com Thu Oct 16 11:51:44 2008 From: mdougherty at pbp.com (Mike Dougherty) Date: Thu, 16 Oct 2008 12:51:44 -0400 Subject: [Javascript] Lambda calculus [WAS: OT: Test] In-Reply-To: References: <48C6DF3A.3030403@internetique.com> <48CA75A9.2030605@internetique.com> <05cf01c928c8$5b681d90$123858b0$@com> <6909507.1224096172530.JavaMail.root@m01> <4402898.1224109281897.JavaMail.root@m01> Message-ID: <59bedf280810160951o28336a89wdbb9bff378ca0879@mail.gmail.com> On Thu, Oct 16, 2008 at 1:00 AM, Paul Novitski wrote: > Can you show us some examples using JavaScript that you've written > with an explanation of what they do? assumption(s): template = "from: <> to: <> subject: <>"; N = { fromUser: "MikeD" ,toUser: "Paul" ,subject: "example" } /* iterating through tree of messaging nodes */ while( N ){ /* create a function that closes over the current object (in this case N) and returns a function for use in a regex .replace() operation */ var replacer = function( oRef ){ return function(str,p1,p2,offset,s){ return oRef[ p1 ]; }; }; /* take the template, find each occurrence of a "mergecode" and pass the mergecode found to the function that is returned by giving the N object to the "replacer" function */ var rendered = template.replace( /(?:<<)([^>]*)(?:>>)/gi ,replacer(N) ); // do something now with the string in 'rendered' // [ next N... ] } /* end: while(N) */ In a previous project I first used .match() to get a list of mergecodes, then iterated through the matches and made a global replacement for each match. That strategy may have been more readable, but conceptually would perform worse as the number of mergecodes and the size of the template increases. For this case, I already had a complex node tree in memory anyway. This example uses a much simpler template. I'm also working on implementing a method to execute functions of the node object for multivalued properties (like multiple "To:" on an email) - so the template mergecode can contain a function reference rather than a simple property reference. While researching this solution (chatting with [freenode] ##javascript IRC channel) I thought this technique might be a slick way to implement an i18n character replacement - all it would require is an object to act as an index of character mappings, and a regex to find index keys to lookup. Of course, I haven't implemented that yet so I have no idea what devil-in-the-details would be encountered. Comments? Questions? (other than "Are you crazy?" as both a comment and rhetorical question) From john at jwarner.com Fri Oct 17 09:14:36 2008 From: john at jwarner.com (John Warner) Date: Fri, 17 Oct 2008 10:14:36 -0400 Subject: [Javascript] IE attachEvent question In-Reply-To: <59bedf280810160951o28336a89wdbb9bff378ca0879@mail.gmail.com> Message-ID: <01cf01c93062$b251bfc0$3d02a8c0@Pluto> First the target for this is IE only and anyone who sees this via the intranet with another browser, we don't care. My question I want to simplify a bit of client code on a page that gets loaded. To keep everything separate we have been using attachEvent to add onFocus events to several controls. The question is, is there anyway I can pass a parameter to the event code itself. I noticed several of the events are basically the same code except for determining the html tag. I'd like to just pass the control to the event handler and then just fire the code and reuse that function. Can anyone help here? Thanks if this seems simple, JavaScript is really not my area. John Warner From david at dorward.me.uk Fri Oct 17 10:07:03 2008 From: david at dorward.me.uk (David Dorward) Date: Fri, 17 Oct 2008 16:07:03 +0100 Subject: [Javascript] IE attachEvent question In-Reply-To: <01cf01c93062$b251bfc0$3d02a8c0@Pluto> References: <01cf01c93062$b251bfc0$3d02a8c0@Pluto> Message-ID: <48F8AA17.20408@dorward.me.uk> John Warner wrote: > First the target for this is IE only and anyone who sees this via the > intranet with another browser, we don't care. Wasn't it IBM who scrapped a plan to switch their desktops to a cheaper alternative when it became clear bits of their Intranet (written years earlier when they thought they'd use Windows forever) depended on IE and rewriting everything after the fact would inflate the cost dramatically? (Hint, hint). Use a library (like YUI or JQuery) to attach your events - they do all the heavy lifting to normalise between browsers. > My question I want to > simplify a bit of client code on a page that gets loaded. To keep > everything separate we have been using attachEvent to add onFocus events to > several controls. The question is, is there anyway I can pass a parameter > to the event code itself. I noticed several of the events are basically the > same code except for determining the html tag. I'd like to just pass the > control to the event handler and then just fire the code and reuse that > function. Can anyone help here? Generate the function using a closure. http://developer.mozilla.org/en/A_re-introduction_to_JavaScript#Closures -- David Dorward http://dorward.me.uk/ From peter at brunone.com Fri Oct 17 10:11:00 2008 From: peter at brunone.com (Peter Brunone) Date: Fri, 17 Oct 2008 08:11:00 -0700 Subject: [Javascript] IE attachEvent question Message-ID: <20aba53c8bde4f0f96b06e4e1b7b81b4@maila15.webcontrolcenter.com> See the last post on the following thread: http://codingforums.com/archive/index.php?t-20212.html HTH, Peter ---------------------------------------- From: "John Warner" First the target for this is IE only and anyone who sees this via the intranet with another browser, we don't care. My question I want to simplify a bit of client code on a page that gets loaded. To keep everything separate we have been using attachEvent to add onFocus events to several controls. The question is, is there anyway I can pass a parameter to the event code itself. I noticed several of the events are basically the same code except for determining the html tag. I'd like to just pass the control to the event handler and then just fire the code and reuse that function. Can anyone help here? Thanks if this seems simple, JavaScript is really not my area. John Warner From john at jwarner.com Fri Oct 17 10:32:02 2008 From: john at jwarner.com (John Warner) Date: Fri, 17 Oct 2008 11:32:02 -0400 Subject: [Javascript] IE attachEvent question In-Reply-To: <20aba53c8bde4f0f96b06e4e1b7b81b4@maila15.webcontrolcenter.com> Message-ID: <01d201c9306d$83aea880$3d02a8c0@Pluto> Thanks. John Warner > -----Original Message----- > From: javascript-bounces at lists.evolt.org > [mailto:javascript-bounces at lists.evolt.org] On Behalf Of Peter Brunone > Sent: Friday, October 17, 2008 11:11 AM > To: javascript at lists.evolt.org > Subject: Re: [Javascript] IE attachEvent question > > > See the last post on the following thread: > > http://codingforums.com/archive/index.php?t-20212.html > > HTH, > > Peter > > ---------------------------------------- > > From: "John Warner" > > First the target for this is IE only and anyone who sees this > via the intranet with another browser, we don't care. My > question I want to simplify a bit of client code on a page > that gets loaded. To keep everything separate we have been > using attachEvent to add onFocus events to several controls. > The question is, is there anyway I can pass a parameter to > the event code itself. I noticed several of the events are > basically the same code except for determining the html tag. > I'd like to just pass the control to the event handler and > then just fire the code and reuse that function. Can anyone > help here? Thanks if this seems simple, JavaScript is really > not my area. > > John Warner > _______________________________________________ > Javascript mailing list > Javascript at lists.evolt.org > http://lists.evolt.org/mailman/listinfo/javascript > From rene7705 at gmail.com Thu Oct 30 08:53:01 2008 From: rene7705 at gmail.com (Rene Veerman) Date: Thu, 30 Oct 2008 14:53:01 +0100 Subject: [Javascript] [released] themeable canvas loader icon, with semi-transparency support Message-ID: <4909BC3D.8090808@gmail.com> http://mediabeez.ws/mediaBeez/permalink.php?tag=visCanvasLoaderGraphic This the second opensource plugin that I release; a loader icon capable of displaying colorfull yet semi-transparent animated graphics. It's simple to use and design for.. I'll admit right now that there are still some issues in IE, like activeX warnings in some cases, but i hope that over time those can be fixed and updated too.. Comments and bug-notices are very welcome, either on the list or via the comments-button (top-left on the page).