From Cbielanski at inta.org Mon Feb 7 09:53:51 2005 From: Cbielanski at inta.org (Chris Bielanski) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] Foiling AutoComplete for non-Password controls Message-ID: <4DBE3775D77C744E9D1B9D06082E75D60AAB37@intamail1.ny.inta.org> Hey gang, How can I get the AutoComplete feature of [insert browser here] to ignore a text input control, without using "password?" I'm writing a payment screen that accepts a credit card number, but upon refresh, I've found that AutoComplete has held on to my cardnumber. This is undesired behavior, so how to foil it? Don't worry, I know all the rules and details about SB-930 (last-5-digits), CVV2 code, etc. I just need to know if there's a DOM or XHTML keyword that tells AutoComplete to shove off. The first workaround I conceived is to use a dynamically generated name for the input control, and so forth, but that does seem kludgey. Thanks, Chris Bielanski Web Programmer, International Trademark Association, 655 Third Avenue, 10th Floor New York, NY 10017-5617 USA +1 (212) 642-1745, f: +1 (212) 768-7796 mailto:cbielanski@inta.org, www.inta.org INTA -- 125 Years of Excellence From phillip.powell at adnet-sys.com Mon Feb 7 10:06:26 2005 From: phillip.powell at adnet-sys.com (Phillip Powell) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] Foiling AutoComplete for non-Password controls In-Reply-To: <4DBE3775D77C744E9D1B9D06082E75D60AAB37@intamail1.ny.inta.org> References: <4DBE3775D77C744E9D1B9D06082E75D60AAB37@intamail1.ny.inta.org> Message-ID: <420783F2.6030303@adnet-sys.com> If you find out and is not posted here, TELL ME DAMMIT! :) Phil Chris Bielanski wrote: >Hey gang, >How can I get the AutoComplete feature of [insert browser here] to ignore a >text input control, without using "password?" > >I'm writing a payment screen that accepts a credit card number, but upon >refresh, I've found that AutoComplete has held on to my cardnumber. This is >undesired behavior, so how to foil it? Don't worry, I know all the rules and >details about SB-930 (last-5-digits), CVV2 code, etc. I just need to know if >there's a DOM or XHTML keyword that tells AutoComplete to shove off. The >first workaround I conceived is to use a dynamically generated name for the >input control, and so forth, but that does seem kludgey. > >Thanks, >Chris Bielanski >Web Programmer, >International Trademark Association, >655 Third Avenue, 10th Floor >New York, NY 10017-5617 USA >+1 (212) 642-1745, f: +1 (212) 768-7796 >mailto:cbielanski@inta.org, www.inta.org >INTA -- 125 Years of Excellence > >_______________________________________________ >New York PHP SIG: Front End >http://lists.nyphp.org/mailman/listinfo/front-end >http://www.newyorkphp.org > > > -- --------------------------------------------------------------------------------- Phil Powell Multimedia Programmer BPX Technologies, Inc. #: (703) 709-7218 x107 Fax: (703) 709-7219 From dan at danhorning.com Mon Feb 7 10:37:48 2005 From: dan at danhorning.com (Dan Horning) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] Foiling AutoComplete for non-Password controls In-Reply-To: <420783F2.6030303@adnet-sys.com> References: <4DBE3775D77C744E9D1B9D06082E75D60AAB37@intamail1.ny.inta.org> <420783F2.6030303@adnet-sys.com> Message-ID: <42078B4C.7010803@danhorning.com> couldn't you in a a worst case senario use a flash object to be the input??? just a quick thought Phillip Powell wrote: > If you find out and is not posted here, TELL ME DAMMIT! :) > > Phil > > Chris Bielanski wrote: > >> Hey gang, >> How can I get the AutoComplete feature of [insert browser here] to >> ignore a >> text input control, without using "password?" >> >> I'm writing a payment screen that accepts a credit card number, but upon >> refresh, I've found that AutoComplete has held on to my cardnumber. >> This is >> undesired behavior, so how to foil it? Don't worry, I know all the >> rules and >> details about SB-930 (last-5-digits), CVV2 code, etc. I just need to >> know if >> there's a DOM or XHTML keyword that tells AutoComplete to shove off. The >> first workaround I conceived is to use a dynamically generated name >> for the >> input control, and so forth, but that does seem kludgey. >> >> Thanks, >> Chris Bielanski >> Web Programmer, International Trademark Association, >> 655 Third Avenue, 10th Floor >> New York, NY 10017-5617 USA >> +1 (212) 642-1745, f: +1 (212) 768-7796 >> mailto:cbielanski@inta.org, www.inta.org INTA -- 125 Years of >> Excellence >> >> _______________________________________________ >> New York PHP SIG: Front End >> http://lists.nyphp.org/mailman/listinfo/front-end >> http://www.newyorkphp.org >> >> >> > > -- Dan Horning http://www.danhorning.com/ Office - 1-800-863-3854 ext. 502 From Cbielanski at inta.org Mon Feb 7 10:43:10 2005 From: Cbielanski at inta.org (Chris Bielanski) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] Foiling AutoComplete for non-Password controls Message-ID: <4DBE3775D77C744E9D1B9D06082E75D60AAB3A@intamail1.ny.inta.org> XHTML > Flash, for our purposes. We like the KISS approach to most things, if such can be achieved. Thanks, Chris Bielanski Web Programmer, International Trademark Association, 655 Third Avenue, 10th Floor New York, NY 10017-5617 USA +1 (212) 642-1745, f: +1 (212) 768-7796 mailto:cbielanski@inta.org, www.inta.org INTA -- 125 Years of Excellence > -----Original Message----- > From: Dan Horning [mailto:dan@danhorning.com] > Sent: Monday, February 07, 2005 10:38 AM > To: NYPHP@nyphp.org; Front End > Cc: NYPHP@nyphp.org > Subject: Re: [front-end] Foiling AutoComplete for > non-Password controls > > > couldn't you in a a worst case senario use a flash object to > be the input??? > > just a quick thought > > Phillip Powell wrote: > > > If you find out and is not posted here, TELL ME DAMMIT! :) > > > > Phil > > > > Chris Bielanski wrote: > > > >> Hey gang, > >> How can I get the AutoComplete feature of [insert browser here] to > >> ignore a > >> text input control, without using "password?" > >> > >> I'm writing a payment screen that accepts a credit card > number, but upon > >> refresh, I've found that AutoComplete has held on to my > cardnumber. > >> This is > >> undesired behavior, so how to foil it? Don't worry, I know all the > >> rules and > >> details about SB-930 (last-5-digits), CVV2 code, etc. I > just need to > >> know if > >> there's a DOM or XHTML keyword that tells AutoComplete to > shove off. The > >> first workaround I conceived is to use a dynamically > generated name > >> for the > >> input control, and so forth, but that does seem kludgey. > >> > >> Thanks, > >> Chris Bielanski > >> Web Programmer, International Trademark Association, > >> 655 Third Avenue, 10th Floor > >> New York, NY 10017-5617 USA > >> +1 (212) 642-1745, f: +1 (212) 768-7796 > >> mailto:cbielanski@inta.org, www.inta.org INTA -- 125 Years of > >> Excellence > >> > >> _______________________________________________ > >> New York PHP SIG: Front End > >> http://lists.nyphp.org/mailman/listinfo/front-end > >> http://www.newyorkphp.org > >> > >> > >> > > > > > > > -- > Dan Horning > http://www.danhorning.com/ > Office - 1-800-863-3854 ext. 502 > > _______________________________________________ > New York PHP SIG: Front End > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.newyorkphp.org > From mitch.pirtle at gmail.com Mon Feb 7 11:28:55 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] javascript character counters Message-ID: <330532b605020708286ac05091@mail.gmail.com> Hey FE list, Just got a request to incorporate a character counter, attached to a textarea that displays something like this: "You have xxx characters remaining for your message." I've searched around, but not finding anything useful. Any folks with experience doing stuff like this? -- Mitch From drydell at att.net Mon Feb 7 11:33:46 2005 From: drydell at att.net (drydell@att.net) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] Foiling AutoComplete for non-Password controls Message-ID: <020720051633.23739.4207986A000B0DD500005CBB216046664804040A0B979D0B@att.net> there's an HTML attribute for the input tag that handles it: From chsnyder at gmail.com Mon Feb 7 11:36:08 2005 From: chsnyder at gmail.com (csnyder) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] Foiling AutoComplete for non-Password controls In-Reply-To: <4DBE3775D77C744E9D1B9D06082E75D60AAB3A@intamail1.ny.inta.org> References: <4DBE3775D77C744E9D1B9D06082E75D60AAB3A@intamail1.ny.inta.org> Message-ID: Ummm, it's not official that I know of, but it seems to work: Add an autocomplete="off" attribute to the input element in question. ymmv. From Cbielanski at inta.org Mon Feb 7 11:55:19 2005 From: Cbielanski at inta.org (Chris Bielanski) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] javascript character counters Message-ID: <4DBE3775D77C744E9D1B9D06082E75D60AAB3C@intamail1.ny.inta.org> Javascript has that nice cheap ".length" attribute. Since it's loosely typed, you'll almost always get a value. Tie a counting function to the onchange of the textarea, do the math and output the result to a formfield (cheaper than trying to deal with .innerHTML, IMHO) that displays the number of characters left. HTH, Chris Bielanski Web Programmer, International Trademark Association, 655 Third Avenue, 10th Floor New York, NY 10017-5617 USA +1 (212) 642-1745, f: +1 (212) 768-7796 mailto:cbielanski@inta.org, www.inta.org INTA -- 125 Years of Excellence > -----Original Message----- > From: Mitch Pirtle [mailto:mitch.pirtle@gmail.com] > Sent: Monday, February 07, 2005 11:29 AM > To: NYPHP SIG: Front End > Subject: [front-end] javascript character counters > > > Hey FE list, > > Just got a request to incorporate a character counter, attached to a > textarea that displays something like this: "You have xxx characters > remaining for your message." > > I've searched around, but not finding anything useful. Any folks with > experience doing stuff like this? > > -- Mitch > _______________________________________________ > New York PHP SIG: Front End > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.newyorkphp.org > From Thomas.Freedman at ubs.com Mon Feb 7 12:16:04 2005 From: Thomas.Freedman at ubs.com (Freedman, Tom S.) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] javascript character counters Message-ID: We're using one in a page here... we created a generic function, so it looks a bit more complicated than it has to: Here is the function: //=========================================== function countChars(formName,elemName,cntrName) { var textStr = eval("document." + formName + "." + elemName + ".value;"); var textLen = textStr.length; var REMAINDER = 255 - textLen; eval("document." + formName + "." + cntrName + ".value = " + REMAINDER); } // END FUNCTION //=========================================== And here's an example of how to call it... Characters Remaining:

You have entered 0 characters.
You have 30 characters left.
Mitch Pirtle wrote: > Hey FE list, > > Just got a request to incorporate a character counter, attached to a > textarea that displays something like this: "You have xxx characters > remaining for your message." > > I've searched around, but not finding anything useful. Any folks with > experience doing stuff like this? > > -- Mitch From Cbielanski at inta.org Mon Feb 7 12:16:56 2005 From: Cbielanski at inta.org (Chris Bielanski) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] javascript character counters Message-ID: <4DBE3775D77C744E9D1B9D06082E75D60AAB3D@intamail1.ny.inta.org> /Nice!/ Thanks, Chris Bielanski Web Programmer, International Trademark Association, 655 Third Avenue, 10th Floor New York, NY 10017-5617 USA +1 (212) 642-1745, f: +1 (212) 768-7796 mailto:cbielanski@inta.org, www.inta.org INTA -- 125 Years of Excellence > snipped for brevity... From phillip.powell at adnet-sys.com Mon Feb 7 12:45:01 2005 From: phillip.powell at adnet-sys.com (Phillip Powell) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] javascript character counters In-Reply-To: <330532b605020708286ac05091@mail.gmail.com> References: <330532b605020708286ac05091@mail.gmail.com> Message-ID: <4207A91D.1090503@adnet-sys.com> Mitch Pirtle wrote: >Hey FE list, > >Just got a request to incorporate a character counter, attached to a >textarea that displays something like this: "You have xxx characters >remaining for your message." > >I've searched around, but not finding anything useful. Any folks with >experience doing stuff like this? > >-- Mitch >_______________________________________________ >New York PHP SIG: Front End >http://lists.nyphp.org/mailman/listinfo/front-end >http://www.newyorkphp.org > > > I've done that before, it's quite easy when you use the onChange event method of the textarea to count the length of document.forms[0].myTextarea.value and subtract from whatever max ceiling value you obtain. But you must be aware that if Javascript is turned off this feature is useless. Also, it is very difficult to use within Section 508 Compliance. Phil -- --------------------------------------------------------------------------------- Phil Powell Multimedia Programmer BPX Technologies, Inc. #: (703) 709-7218 x107 Fax: (703) 709-7219 From phillip.powell at adnet-sys.com Mon Feb 7 12:46:15 2005 From: phillip.powell at adnet-sys.com (Phillip Powell) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] javascript character counters In-Reply-To: <4DBE3775D77C744E9D1B9D06082E75D60AAB3C@intamail1.ny.inta.org> References: <4DBE3775D77C744E9D1B9D06082E75D60AAB3C@intamail1.ny.inta.org> Message-ID: <4207A967.4030104@adnet-sys.com> Chris Bielanski wrote: >Javascript has that nice cheap ".length" attribute. Since it's loosely >typed, you'll almost always get a value. Tie a counting function to the >onchange of the textarea, do the math and output the result to a formfield >(cheaper than trying to deal with .innerHTML, IMHO) that displays the number >of characters left. > > > You'll be dealing also with client browser version and type issues with ".innerHTML". Unless you want to deal with complex DHTML, avoid. Phil >HTH, >Chris Bielanski >Web Programmer, >International Trademark Association, >655 Third Avenue, 10th Floor >New York, NY 10017-5617 USA >+1 (212) 642-1745, f: +1 (212) 768-7796 >mailto:cbielanski@inta.org, www.inta.org >INTA -- 125 Years of Excellence > > > > >>-----Original Message----- >>From: Mitch Pirtle [mailto:mitch.pirtle@gmail.com] >>Sent: Monday, February 07, 2005 11:29 AM >>To: NYPHP SIG: Front End >>Subject: [front-end] javascript character counters >> >> >>Hey FE list, >> >>Just got a request to incorporate a character counter, attached to a >>textarea that displays something like this: "You have xxx characters >>remaining for your message." >> >>I've searched around, but not finding anything useful. Any folks with >>experience doing stuff like this? >> >>-- Mitch >>_______________________________________________ >>New York PHP SIG: Front End >>http://lists.nyphp.org/mailman/listinfo/front-end >>http://www.newyorkphp.org >> >> >> >_______________________________________________ >New York PHP SIG: Front End >http://lists.nyphp.org/mailman/listinfo/front-end >http://www.newyorkphp.org > > > -- --------------------------------------------------------------------------------- Phil Powell Multimedia Programmer BPX Technologies, Inc. #: (703) 709-7218 x107 Fax: (703) 709-7219 From tom at supertom.com Wed Feb 9 14:23:17 2005 From: tom at supertom.com (Tom Melendez) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] Javascript Question Message-ID: <420A6325.3020106@supertom.com> Hey Folks, I'm having a javascript issue that hopefully someone well versed can help me with. We use dotproject in our company, and are "reasonably" happy with it. We've made a bunch of customizations to it, and installed some "unofficial" patches along the way. One of the unofficial patches that we've installed collapses the subtasks, and it works quite nicely. What we are trying to do now is have those subtasks collapsed on page load. The author of the original code to do this is no longer supporting it, and since it is not an official patch, the dotproject folks don't have much to offer either. Now that you have some background, take a look at these two files: # html http://www.supertom.com/dotproject_main.txt # javascript http://www.supertom.com/dotproject_js.txt What I want to do is call the function "dpCollapseAll" in the body onLoad event. My question is, I'm not sure what to pass in to the function to do it. As you can see, the "dpCollapseAll" is called inside the table, but references 3 levels of parentnodes, like so: dpCollapseAll(this.parentNode.parentNode.parentNode) What is the argument that I need send in to this function to get to the right element? If I put an alert box in the place where this is called, I get object HTMLTableSectionElement I've also tried the DOM inspector in Firefox, but apparently I'm not finding the right element to reference. Any help is greatly appreciated! Thanks, Tom www.liphp.org From tom at supertom.com Tue Feb 22 12:57:55 2005 From: tom at supertom.com (Tom Melendez) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] Javascript and Textboxes to enter IPs Message-ID: <421B72A3.9020200@supertom.com> Hey Folks, I'm looking to build an IP control. Ideally, I would like to use 4 mini text boxes, seperated by a period. Even more ideally, I would like to enter the numbers, and press the period key, and have the cursor hop to the next box. I can't be the only person who ever wanted to do this - anyone have/seen anything like this? Thanks, Tom www.liphp.org From Cbielanski at inta.org Tue Feb 22 13:12:57 2005 From: Cbielanski at inta.org (Chris Bielanski) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] Javascript and Textboxes to enter IPs Message-ID: <43387D79FA1DB74AA876E4C3F4867D320C81E1@intamail1.ny.inta.org> Sounds pretty simple. You're just creating a function that is hooked to "onkeyup" event of these input boxes. The function does four things: 1: makes sure the input is 0-9 or . (period) 2: gets the name of the current input control 3: enforces 1-3 characters per field, catches "> 255", whatever other criteria you want for exclusions 4: Moves to the next control if < 4 and if input == "." Unfortunately, I don't have the time to kick out a protoype... Thanks, Chris Bielanski Web Programmer, International Trademark Association, 655 Third Avenue, 10th Floor New York, NY 10017-5617 USA +1 (212) 642-1745, f: +1 (212) 768-7796 mailto:cbielanski@inta.org, www.inta.org INTA -- 125 Years of Excellence > -----Original Message----- > From: Tom Melendez [mailto:tom@supertom.com] > Sent: Tuesday, February 22, 2005 12:58 PM > To: front-end@lists.nyphp.org > Subject: [front-end] Javascript and Textboxes to enter IPs > > > Hey Folks, > > I'm looking to build an IP control. Ideally, I would like to > use 4 mini > text boxes, seperated by a period. Even more ideally, I > would like to > enter the numbers, and press the period key, and have the > cursor hop to > the next box. I can't be the only person who ever wanted to > do this - > anyone have/seen anything like this? > > Thanks, > > Tom > www.liphp.org > > _______________________________________________ > New York PHP SIG: Front End > http://lists.nyphp.org/mailman/listinfo/front-end > http://www.newyorkphp.org > From mitch.pirtle at gmail.com Fri Feb 25 13:15:10 2005 From: mitch.pirtle at gmail.com (Mitch Pirtle) Date: Tue Mar 4 07:24:10 2008 Subject: [front-end] phpShop integrationd Message-ID: <330532b60502251015e602f2b@mail.gmail.com> Just noticed that mambo-phpShop has their new forums up today, running my favourite FOSS forum from SimpleMachines.org. http://www.mambo-phpshop.net/index.php?option=com_smf&Itemid=71 Those of you that are having trouble with phpShop may find this an invaluable resource. -- Mitch