Re: Javascript question

2011-03-14 Thread Carl Von Stetten
Is it possible that the click event is actually happening on the TD elements and not the TR? You might try attaching the click event to the parent table (so it only binds to one element) and take advantage of event bubbling. Use the event.target attribute to get to the row:

Re: Javascript question

2011-03-13 Thread Jake Churchill
Look into jQuery's .each() method. It helps in loopin over things like that -Jake Sent from my Droid On Mar 13, 2011 9:51 AM, fun and learning funandlrnn...@gmail.com wrote: Hi All - I am trying to get the following working. It seemed to work initially, but somehow it stopped working I

Re: Javascript question

2011-03-13 Thread Russ Michaels
it looks like you are using the classname instead of the object ID. normally the $() function is fer getting a reference to a obejct by its ID. $(.rowclick) shouldn't this be $(row_1_4_2009_abc) On Sun, Mar 13, 2011 at 3:29 PM, Jake Churchill reyna...@gmail.com wrote: Look into jQuery's

Re: Javascript question

2011-03-13 Thread Michael Grant
$(.rowclick) is completely acceptable. It will just add the function to all elements with that class name, which I assume is that the OP is looking for. OP: In the code you pasted what part isn't working exactly? All you are doing is setting some variables. I don't see in the code where any

Re: Javascript question

2011-03-13 Thread Michael Grant
And one other thought. If your code posted accurately reflects the id's of the items you can replace this: var getAttributes = row_id.split(_); var setCommonAttr = getAttributes[1] + _ + getAttributes[2] + _ + getAttributes[3] + _ + getAttributes[4]; var new_row_id =

RE: Javascript question

2011-03-13 Thread andy matthews
You didn't say what it is you're trying to accomplish, nor did you post example code, so we can't really say what's not working. One thing you could try is simplifying your code. Try replacing 3 lines with one: // old lines var getAttributes = row_id.split(_); var setCommonAttr =

Re: Javascript question

2009-03-18 Thread Ian Skinner
Jenny Gavin-Wear wrote: Could someone tell me what I am doing wrong, please? Does your form control of an id of 'registerForm' with that exact capitalization? Is it the only thing on the page with that id? ~| Adobe®

Re: Javascript question

2009-03-18 Thread Massimo Foti
script type=text/javascript function submitForm() { document.getElementById(registerForm).submit() } /script and this as the trigger: input name=roomID type=radio id=radio value=0 cfif session.roomID is 0checked /cfif onClick=submitForm() I am getting the error:

Re: Javascript question

2009-03-18 Thread Ryan Stille
Do you have ID=registerForm in your opening form tag? Don't forget it is case sensitive, too. -Ryan Jenny Gavin-Wear wrote: I have in the header: script type=text/javascript function submitForm() { document.getElementById(registerForm).submit() } /script and this as the trigger:

Re: Javascript question

2009-03-18 Thread Claude Schneegans
document.registerForm.submit is not a function Apparently, getElementById() has returned an object which is not a form, thus which has no submit function.. Make sure no other object has an id=registerForm. ~| Adobe®

IUM Re: Javascript question

2009-03-18 Thread Jenny Gavin-Wear
Thanks all for the rapid replies. I'm sure it's something stupid I'm doing, arrghhh I've tried this as a test and it works fine: cfquery name=rooms datasource=#application.cfdatasource# SELECT * FROM tbl_confRooms where confID = #session.confID# /cfquery HTML HEAD /HEAD BODY BGCOLOR=#FF

IUM IUM Re: Javascript question

2009-03-18 Thread Jenny Gavin-Wear
ha! Got it! it was the submit buttons on the page being named submit ... Thanks all, pointed me in the right direction !! -Original Message- From: Jenny Gavin-Wear [mailto:jenn...@fasttrackonline.co.uk] Sent: 18 March 2009 14:24 To: cf-talk Subject: SPAM-MEDIUM IUM Re: Javascript

RE: Javascript question

2009-02-13 Thread Dawson, Michael
This isn't the answer you are asking for, but I would suggest that you use jQuery for this task. jQuery's selectors would make it easier to find the objects you want to modify, then you can easily set the disabled flag, as needed. Thanks, Mike -Original Message- From: Scott Stewart

Re: Javascript question

2009-02-13 Thread Scott Stewart
I wish I could, I've had fits trying to get jquery to function properly with this layout in IE. I'm not sure jquery likes nested tables. Dawson, Michael wrote: This isn't the answer you are asking for, but I would suggest that you use jQuery for this task. jQuery's selectors would make it

RE: Javascript question

2009-02-13 Thread Adrian Lynch
I know, I hate it sometimes too when you ask a question and someone says, don't do it that way, do it this completely different way, but, jQuery! script type=text/javascript src=/scripts/jquery-1.3.1.min.js/script script type=text/javascript $(function() {

RE: Javascript question

2009-02-13 Thread Adrian Lynch
Could you post the HTML source for us? Or point to it on t'internet. Adrian -Original Message- From: Scott Stewart [mailto:saste...@email.unc.edu] Sent: 13 February 2009 16:28 To: cf-talk Subject: Re: Javascript question I wish I could, I've had fits trying to get jquery

Re: Javascript question

2009-02-13 Thread Scott Stewart
jquery doesn't work with this layout, that's the first place I went. Adrian Lynch wrote: I know, I hate it sometimes too when you ask a question and someone says, don't do it that way, do it this completely different way, but, jQuery! script type=text/javascript

Re: Javascript question

2009-02-13 Thread Claude Schneegans
Hi, IMHO, the simplest on most efficient way to bypass the problem would be to make sure no element has a name which could be identical to the ID of another one. For instance, always use something like ID=id_ NAME=name_

Re: Javascript question

2009-02-13 Thread Brian Swartzfager
jquery doesn't work with this layout, that's the first place I went. Not to keep beating the jQuery horse, but if jQuery is referencing the radio button by ID or some other non-positional selector, the layout shouldn't matter. Just to be sure, I wrote up a quick little test with 2 sets of

Re: Javascript question

2009-02-13 Thread Scott Stewart
and that would/does work. I don't know if it's an error with the layout or jquery can't traverse nested tables or what but I've never been able to get it to function consistently in this layout Brian Swartzfager wrote: jquery doesn't work with this layout, that's the first place I went.

Re: Javascript question

2009-02-13 Thread Nathan Strutz
Ok scott, you've piqued my interest. You've _got_ to share this interface that chokes jQuery. :) nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] On Fri, Feb 13, 2009 at 12:57 PM, Scott Stewart saste...@email.unc.eduwrote: and that

RE: Javascript question

2009-02-13 Thread Adrian Lynch
SHARE IT, SHARE IT, SHARE IT, SHARE IT, SHARE IT!! :OD Go on, take out any sensitive info (but make sure the structure remains the same). Adrian -Original Message- From: Nathan Strutz [mailto:str...@gmail.com] Sent: 13 February 2009 21:50 To: cf-talk Subject: Re: Javascript

RE: javascript question

2008-08-14 Thread Andy Matthews
Why not just have it all in one form field? Easier to store, easier to manage, no extra coding needed. -Original Message- From: BJ McShane [mailto:[EMAIL PROTECTED] Sent: Thursday, August 14, 2008 10:25 AM To: CF-Talk Subject: javascript question I built a form for my users where they

RE: javascript question

2008-08-14 Thread Dave Phillips
BJ, Yes, there is a way you can do that. I'm not sure of the exact syntax, but hopefully you can google this and get a solution: You need to use the onkeypress event, something like this: input type=text name=whatever onkeypress=changePeriod(); Your changePeriod() function should look at the

Re: javascript question

2008-08-14 Thread Yuliang Ruan
remember that when you do this, it changes the behavior of the keystroke in the entire window. If you have another field that can input a period(.), this will make it a tab too. Not sure if you're allowed to check focus and based on the focused element, maybe make a decision to bypass or

Re: javascript question

2008-08-14 Thread Yuliang Ruan
oh wait n/m the way dave has it, it only activates on that element. :) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial

Re: javascript question

2008-08-14 Thread BJ McShane
Dave thanks for the input. I did do some google searches on this but never found a solution that would work. I'll try what you posted and try some more searches to see what I can find. thanks! ~| Adobe® ColdFusion® 8 software

Re: javascript question

2008-08-14 Thread BJ McShane
Yes I did take that into account. If I keep in at the input tag level I think it should only effect the fields I want. I'll have to do more testing. thanks, ~| Adobe® ColdFusion® 8 software 8 is the most important and

Re: javascript question

2008-08-14 Thread BJ McShane
I'll probably change it that way. I stored it in 4 different field in the DB since each of the 4 parts mean certain things to the user. They could search and sort based on what they are trying to find. Also when they search they can just put input into any of the fields to find all the IPs

Re: javascript question

2008-08-14 Thread William Seiter
If the code isn't cross-browser compatible (not tested, probably is though) You could use the same concept to activate the javascript , when the javascript senses the key that was pressed, if it was the 'period' then have the element's 'tabindex' detected and then have the system 'focus()' on

Re: javascript question

2007-06-01 Thread Charlie Griefer
the onchange() goes into the select element. select name=NEW_Plate_to_make onchange=displayStockLevels(this.options[this.selectedIndex].value); cfloop query=getPlates option value=#getPlates.ID##getPlates.Name#/option /cfloop /select On 6/1/07, Chad Gray [EMAIL PROTECTED] wrote: I thought

RE: javascript question

2007-06-01 Thread Chad Gray
Oh... duh! Thanks for the help Charlie that works great! -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Friday, June 01, 2007 3:39 PM To: CF-Talk Subject: Re: javascript question the onchange() goes into the select element. select name=NEW_Plate_to_make

RE: Javascript Question

2007-04-12 Thread Scott Stewart
Never mind, I figured it out -- Scott Stewart ColdFusion Developer SSTWebworks 7241 Jillspring Ct. Springfield, Va. 22152 (703) 220-2835 http://www.sstwebworks.com -Original Message- From: Scott Stewart [mailto:[EMAIL PROTECTED] Sent: Thursday, April 12, 2007 10:52 AM To: CF-Talk

RE: Javascript Question

2007-03-07 Thread Dave Watts
Can an instance of a JavaScript object know the name of its instance? My understanding is that it generally can't; this makes sense, since an object may have more than one reference. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber

RE: Javascript Question

2007-03-07 Thread Brad Wood
By more that one reference do you mean more than one instance, or more than one pointer to the same instance? ~Brad My understanding is that it generally can't; this makes sense, since an object may have more than one reference.

RE: Javascript Question

2007-03-07 Thread Jim Davis
-Original Message- From: Brad Wood [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 07, 2007 10:53 PM To: CF-Talk Subject: OT: Javascript Question Hi guys, I've got a JavaScript question which has me puzzled. Can an instance of a JavaScript object know the name of its instance?

RE: Javascript Question

2007-03-07 Thread Dave Watts
By more that one reference do you mean more than one instance, or more than one pointer to the same instance? The latter. Jim just explained it better than I did. But he's probably not typing with his thumbs! Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software

RE: Javascript Question

2007-03-07 Thread Brad Wood
Lol. It all makes perfect sense. ~Brad ~| Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 Flex 2. Free Trial http://www.adobe.com/products/coldfusion/flex2/ Archive:

RE: JavaScript question.

2006-12-20 Thread Andy Matthews
Using jQuery this would be a snap: $('fieldsent#contacts div'); Assuming that the fieldset tag had an ID of contacts. !//-- andy matthews web developer certified advanced coldfusion programmer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//-

RE: Javascript question...or suggestion where to go to get answer

2006-01-29 Thread Adrian Lynch
Only tested on IE6: Two pages, temp.cfm and temp2.cfm temp.cfm: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head titleUntitled/title script type=text/javascript function pageLoaded() { window.onfocus = function() {

RE: Javascript question...or suggestion where to go to get answer

2006-01-29 Thread Eric Roberts
I will have to try that...thanks! Eric -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Sunday, 29 January 2006 15:32 To: CF-Talk Subject: RE: Javascript question...or suggestion where to go to get answer Only tested on IE6: Two pages, temp.cfm and temp2.cfm

Re: Javascript question...or suggestion where to go to get answer

2006-01-29 Thread Mark Drew
Drew On 29 Jan 2006, at 22:04, Eric Roberts wrote: I will have to try that...thanks! Eric -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Sunday, 29 January 2006 15:32 To: CF-Talk Subject: RE: Javascript question...or suggestion where to go to get answer

RE: Javascript question...or suggestion where to go to get answer

2006-01-29 Thread Eric Roberts
work, however, I may have to use something like this though. Thanks! Eric -Original Message- From: Mark Drew [mailto:[EMAIL PROTECTED] Sent: Sunday, 29 January 2006 18:51 To: CF-Talk Subject: Re: Javascript question...or suggestion where to go to get answer I dont have the code here

RE: Javascript question

2005-12-14 Thread Andrew Scott
Very easy actually. script language=javascript Function showSubmit(element) { Element.style.visibility = show; } /script input style=visibility:hidden; TYPE=submit VALUE=Submit Order Another way you could do this is have the button disabled, and then enable the button once the required

RE: Javascript question

2005-12-14 Thread Bobby Hartsfield
Give the button in question a style like... Style=visibility:hidden; to hide it At the end of your 'calculate total' function or onclick of the total button or wherever you wan it... put document.myformname.mybuttonname.style.visibility='visible'; to show it ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.

Re: Javascript question

2005-12-14 Thread eric.creese
That is what I want to do, show the button only after the total button is clicked, so wouldn't have to do the visbility function pieces in the onclick function? Here is what I have, should have included the other function. So when I click SubtotalItem button the OrderTotal button will appear.

Re: Javascript question - SOLVED

2005-12-14 Thread eric.creese
thanks that was exactly what I was trying to do. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware

RE: Javascript question...

2005-05-10 Thread Che Vilnonis
Mark... Isn't it \n instead of /n ??? -Original Message- From: Mark A Kruger [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 10:55 AM To: CF-Talk Subject: OT: Javascript question... I want to manipulate the innerText property of a div tag. It works fine except that I can't seem

RE: Javascript question...

2005-05-10 Thread Dave Watts
I want to manipulate the innerText property of a div tag. It works fine except that I can't seem to put in a linefeed or break. I tried all the following without success. Does anyone know how to get a linebreak in there? -mark divName.innerText = divName.innerText + some new text +

RE: Javascript question...

2005-05-10 Thread Justin D. Scott
I want to manipulate the innerText property of a div tag. It works fine except that I can't seem to put in a linefeed or break. I tried all the following without success. Does anyone know how to get a linebreak in there? I think you want innerHTML, not innerText.

RE: Javascript question...

2005-05-10 Thread Dave Francis
divName.innerText = divName.innerText + some new text + \n + abc -Original Message- From: Mark A Kruger [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 10:55 AM To: CF-Talk Subject: OT: Javascript question... I want to manipulate the innerText property of a div tag. It works fine

Re: Javascript question...

2005-05-10 Thread Claude Schneegans
If you add \n to the string, it just adds a line feed to the text, which does not show off in HTML. If you add BR, you're actually adding an HTML element to the text, which I think is not allowed. Try to use innerHTML instead. -- ___ REUSE CODE! Use custom

RE: Javascript question...

2005-05-10 Thread S . Isaac Dealey
cfsavecontent variable=mycontent /cfsavecontent divName.innerText += '#jsstringformat(mycontent)#'; or divName.innerText += '\n' your problem in all likelyhood isn't that the space isn't being added but that the content is being interpreted in standard html format wherein white space is

RE: Javascript question...

2005-05-10 Thread Mark A Kruger
probably g -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 10:29 AM To: CF-Talk Subject: RE: Javascript question... Mark... Isn't it \n instead of /n ??? -Original Message- From: Mark A Kruger [mailto:[EMAIL PROTECTED] Sent: Tuesday

RE: Javascript question...

2005-05-10 Thread Mark A Kruger
Ah... innerHTML doh! -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 10:20 AM To: CF-Talk Subject: OT: Javascript question... divName.innerHTML += some new text + br/; This should work Pascal I want to manipulate the innerText property

RE: Javascript Question. JS Wizards needed!

2005-04-15 Thread Andy Mcshane
Yeah, let's all be friends again and move on :-) From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Thu 14/04/2005 23:45 To: CF-Talk Subject: Re: Javascript Question. JS Wizards needed! c'mon people...micha was mean and now everyone's mad at him. we get

RE: Javascript Question. JS Wizards needed!

2005-04-14 Thread Micha Schopman
This is basic beginners stuff. select name=myDropdown onchange=document.getElementById('dropdownValue').innerHTML=(this.value -1) optgroup label=my group option value=1This is number one /optgroup optgroup label=my 2nd group option

RE: Javascript Question. JS Wizards needed!

2005-04-14 Thread dave
it ;) From: Micha Schopman [EMAIL PROTECTED] Sent: Thursday, April 14, 2005 4:04 AM To: CF-Talk cf-talk@houseoffusion.com Subject: RE: Javascript Question. JS Wizards needed! This is basic beginners stuff. This is number one This is number two This is number three Get yourself a basic

RE: Javascript Question. JS Wizards needed!

2005-04-14 Thread Micha Schopman
Because there are people who think they can almost post every lazy question without investing some of their own time in it. Quick, easy, post it here people will solve it for me, in the meanwhile I am gonna get me some coffee. This question has nothing to do with ignorance, it has to do with

RE: Javascript Question. JS Wizards needed!

2005-04-14 Thread Che Vilnonis
... you'll never need it! ~Che -Original Message- From: Micha Schopman [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 4:20 AM To: CF-Talk Subject: RE: Javascript Question. JS Wizards needed! Because there are people who think they can almost post every lazy question without investing

Re: Javascript Question. JS Wizards needed!

2005-04-14 Thread Jochem van Dieten
Che Vilnonis wrote: FTR, I went to several javascript sites. But how should we know that? Describe the research you did to try and understand the problem before you asked the question. http://www.catb.org/~esr/faqs/smart-questions.html#beprecise Jochem

RE: Javascript Question. JS Wizards needed!

2005-04-14 Thread Che Vilnonis
PROTECTED] Sent: Thursday, April 14, 2005 9:32 AM To: CF-Talk Subject: Re: Javascript Question. JS Wizards needed! Che Vilnonis wrote: FTR, I went to several javascript sites. But how should we know that? Describe the research you did to try and understand the problem before you asked the question

RE: Javascript Question. JS Wizards needed!

2005-04-14 Thread Michael T. Tangorre
From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Che Vilnonis wrote: FTR, I went to several javascript sites. But how should we know that? Come on, cut the guy some slack. For heavens sake ~| Find out how

RE: Javascript Question. JS Wizards needed!

2005-04-14 Thread John Stanley
undertaken before the question is posed. -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 9:43 AM To: CF-Talk Subject: RE: Javascript Question. JS Wizards needed! Dually (sp) noted Jochem. Its not like I ask a question a day. More like a few

Re: Javascript Question. JS Wizards needed!

2005-04-14 Thread Mark Drew
. -Original Message- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 9:43 AM To: CF-Talk Subject: RE: Javascript Question. JS Wizards needed! Dually (sp) noted Jochem. Its not like I ask a question a day. More like a few times a year. Believe me, I would

RE: Javascript Question. JS Wizards needed!

2005-04-14 Thread Andy Mcshane
I cannot believe this thread! If in your opinion you think that someone has been lazy and asked a question that you feel that they have not done any reasearch on then don't bother to reply to it! It's that simple. There has been more time spent flaming this poor guy than it actually took to

RE: Javascript Question. JS Wizards needed!

2005-04-14 Thread Che Vilnonis
Thanks all. I can defend myself. :) -Original Message- From: Andy Mcshane [mailto:[EMAIL PROTECTED] Sent: Thursday, April 14, 2005 10:31 AM To: CF-Talk Subject: RE: Javascript Question. JS Wizards needed! I cannot believe this thread! If in your opinion you think that someone has been

Re: Javascript Question. JS Wizards needed!

2005-04-14 Thread Ray Champagne
I totally agree with you on this one. I think an apology is in order, Micha. Your comments were at best uncalled for, and if it were me that said that, I would be ashamed of myself. Ray Andy Mcshane wrote: I cannot believe this thread! If in your opinion you think that someone has been

Re: Javascript Question. JS Wizards needed!

2005-04-14 Thread Claude Schneegans
I totally agree with you on this one. Me too. If someone participates in this list, it is either because he is a beginer and has questions to ask, or because he has the skill and enjoy answering questions,... or both. Beside the fact that we all are specilists in some area and beginers in some

Re: Javascript Question. JS Wizards needed!

2005-04-14 Thread Jared Rypka-Hauer - CMG, LLC
It's nice to see bad behavior being called out... and I won't say another word. :) J On 4/14/05, Claude Schneegans [EMAIL PROTECTED] wrote: I totally agree with you on this one. Me too. If someone participates in this list, it is either because he is a beginer and has questions to ask,

Re: Javascript Question. JS Wizards needed!

2005-04-14 Thread Will Tomlinson
I agree as well. And this is coming from someone that probably holds the HoF record on asking basic questions. Sometimes a berating is warranted, but not on this one. Will ~| Logware (www.logware.us): a new and convenient

Re: Javascript Question. JS Wizards needed!

2005-04-14 Thread Charlie Griefer
c'mon people...micha was mean and now everyone's mad at him. we get it. let's move this over to cf-whogivesacrapanymore :) On 4/14/05, Will Tomlinson [EMAIL PROTECTED] wrote: I agree as well. And this is coming from someone that probably holds the HoF record on asking basic questions.

Re: Javascript question

2005-02-16 Thread Charlie Griefer
change: for (i = 0; i = myform.Impact.length; i++) to: for (i = 0; i myform.Impact.length; i++) On Wed, 16 Feb 2005 11:13:32 -0800, John Wilker [EMAIL PROTECTED] wrote: I didn't know of a good JS list I have the code below. The if loop seems to kill the script. The IF loop runs fine but

RE: Javascript question

2005-02-16 Thread Jim Davis
-Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 16, 2005 2:28 PM To: CF-Talk Subject: Re: Javascript question change: for (i = 0; i = myform.Impact.length; i++) to: for (i = 0; i myform.Impact.length; i++) Yup - Charlie's 'xactly

Re: Javascript question

2005-02-16 Thread Micha Schopman
I did some refactoring for you :) while loops in javascript are quicker than for loops. function Validator() { var myform = document.getElementById('SuggestionForm'); var errMsg = '' var checkboxcounter = 0; if (myform.SuggestionText.value.length = 0){ errMsg += '- Please explain your

Re: Javascript question

2005-02-16 Thread John Wilker
thank you gentlemen!!! The = is no and that worked perfectly. I'm redesigning to use the while loop, thanks for that as well. Much obliged. J On Wed, 16 Feb 2005 14:55:19 -0400, Micha Schopman [EMAIL PROTECTED] wrote: I did some refactoring for you :) while loops in javascript are quicker

Re: JavaScript Question

2005-02-03 Thread Charlie Griefer
just to get you started... for (var i=0; idocument.formname.elements.length; i++) { alert(document.formname.elements[i].type); // based on the 'type' above, you can run various validations to see if it's checked, selected, etc. } On Thu, 3 Feb 2005 12:13:23 -0500, Duane Boudreau

RE: Javascript question

2005-01-24 Thread Andrew Tyrone
Can anyone tell me please what do question marks and colon symbols signify in a javascript command? For example: F.value = S 0 ? ?? + F.value : (new Date(2000, 0, 1, S[0], S[1])).USlocaltimeStr(); My guess is that this is some kind of shorthand for an if-then-else control structure,

RE: JavaScript Question.

2004-08-16 Thread Lofback, Chris
Well, the original code would fail against a value between 0 and 0.01 (like 0.001) so I'd modify it like this: var reg = /([^0-9\.])/g; var str = $0.01; var myValue = parseFloat(str.replace(reg,)) alert(myValue0.01); Also, keep in mind that this will not catch invalid decimal amounts (like

RE: javascript question

2004-08-16 Thread Matthew Walker
So you need people to choose a different number in each select? But what if they've set all 15, but then want to change one. All the other values would be somehow disabled so you couldn't choose another value in the select box. How about this: you can select a value that's already selected but if

RE: javascript question

2004-08-16 Thread Adrian Lynch
As an overview, in the onChange call a function that loops through all the other selects and checks their selected values/indexes(which ever makes more sense) elements = new Array( getElementById('select_1'), getElementById('select_2'), getElementById('select_3'), getElementById('select_4'),

Re: javascript question

2004-08-16 Thread Tony Weeg
matt. great idea...that makes sense since i have to allow them to swap. now, coupled with adrian lynch's idea, will that work? tw On Tue, 17 Aug 2004 11:07:25 +1200, Matthew Walker [EMAIL PROTECTED] wrote: So you need people to choose a different number in each select? But what if they've

Re: javascript question

2004-08-16 Thread Tony Weeg
adrian... thank you, now, how can i marry that with matt's idea? tw On Tue, 17 Aug 2004 00:16:21 +0100, Adrian Lynch [EMAIL PROTECTED] wrote: As an overview, in the onChange call a function that loops through all the other selects and checks their selected values/indexes(which ever makes more

RE: javascript question

2004-08-16 Thread Adrian Lynch
Here's a question for ya. Is this for some sort of ordering? Do you need to order 15 things, hence the need to make sure all fifteen are different? Ade -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: 17 August 2004 00:21 To: CF-Talk Subject: Re: _javascript_ question

RE: javascript question

2004-08-16 Thread Matthew Walker
Yeah I think so. Instead of an alert you just change the selectedIndex to 0 ( getElementById('select_4').selectedIndex = 0 ). But you'd have to have the first option in the select box a null value, i.e. option value=gt; choose lt;/value Or something like that. _ From: Tony Weeg

RE: javascript question

2004-08-16 Thread Adrian Lynch
Yup, sorry, my code wasn't too hot. // Get references to the selects elements = new Array( getElementById('select_1'), getElementById('select_2'), getElementById('select_3'), getElementById('select_4'), ... ... ); function myOnChange() { for (...) { if (

RE: javascript question

2004-08-16 Thread Matthew Walker
Third example down may be of interest http://www.mattkruse.com/_javascript_/selectbox/ _ From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Tuesday, 17 August 2004 11:30 a.m. To: CF-Talk Subject: RE: _javascript_ question Here's a question for ya. Is this for some sort of ordering? Do

Re: javascript question

2004-08-16 Thread Tony Weeg
its for a football pool that im building, and if there are 15 games in a weekend you can only assign 1-15, well 15 times :)make sense?its almost football season (well..american football season) and this is for our pool, im building a site to manage it now... tw On Tue, 17 Aug 2004 00:30:00

RE: javascript question

2004-08-16 Thread Adrian Lynch
Yup, sorry, my code wasn't too hot. // Get references to the selects elements = new Array( getElementById('select_1'), getElementById('select_2'), getElementById('select_3'), getElementById('select_4'), ... ... ); function myOnChange() { for (...) { if (

RE: javascript question

2004-08-16 Thread Adrian Lynch
Yup, I've used something like those. Nice and easy to use. Or how about a nice drag and drop flash movie, not as hard as you'd think :OD Ade -Original Message- From: Matthew Walker [mailto:[EMAIL PROTECTED] Sent: 17 August 2004 00:30 To: CF-Talk Subject: RE: _javascript_ question Third

Re: javascript question

2004-08-16 Thread Tony Weeg
not 15 times, but one number 1-15 each. game 1 point value 15 game 2 point value 12 game 3 point value 11 etc.. until all are used... ive got EVERYTHING done on the site, except you can pick a value more than once, and that aint good...people wont pay attention to what they've used, and it

Re: javascript question

2004-08-16 Thread Tony Weeg
its lookiung like it makes sense!!! good. ok, the for (...) { part needs to know how many too loop through, right? ok, how the heck can cf tell the _javascript_, how many times to loop, that variable will be available in a cfquery.recordCount, which is, i supps how ill build the elements array()

RE: javascript question

2004-08-16 Thread Adrian Lynch
Ermmm, yup, I think. You can dynamically build the elements array and either do... for ( var i = 0; i elements.length ;++ ) {...} ... or... for ( var i = 0; i #query.RecordCount# ;++ ) {...} I'd go for the first one because I'm not keen on mixing CF and JS, but the second might be faster.

Re: javascript question

2004-08-16 Thread Charlie Griefer
somebody was asking today about some old code I wrote...i think it's what you're looking for too: http://charlie.griefer.com/code/js/megan.html Just replace pizza, beer, playboy channel, etc with football teams :) Adrian Lynch wrote: Ermmm, yup, I think. You can dynamically build the elements

RE: javascript question

2004-08-16 Thread Adrian Lynch
Just replace pizza, beer, playboy channel, etc with football teams why would you ever do that!?!? :OD -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: 17 August 2004 00:57 To: CF-Talk Subject: Re: _javascript_ question somebody was asking today about some old

Re: javascript question

2004-08-16 Thread Tony Weeg
charlie... like they always say...if you had t*ts id kiss ya! thanks. perfect.no need to make it any easier! wow, perfect, and it REPLACES the value with the other VALUE, PERFECT later. On Mon, 16 Aug 2004 16:56:58 -0700, Charlie Griefer [EMAIL PROTECTED] wrote: somebody was asking today

Re: javascript question

2004-08-16 Thread Tony Weeg
ADE, Mattthank you GENTS as well. this one from charlie is the money shot. later! tw On Mon, 16 Aug 2004 20:10:26 -0400, Tony Weeg [EMAIL PROTECTED] wrote: charlie... like they always say...if you had t*ts id kiss ya! thanks. perfect.no need to make it any easier! wow, perfect,

RE: javascript question

2004-08-16 Thread Jim Davis
I may be missing something but I think you can do this much simpler. If you create your options up front - all 15 in a collection.You can then loop over that collection 15 times to create your 15 select boxes. I've got a collection object available on my site with an example of how to do this

Re: javascript question

2004-08-16 Thread Dick Applebaum
Hey Tony -- Gonna' Share the app? Stealers will have a good year, but Detroit may be a surprise (Ram fan from 1951-2004) Dick On Aug 16, 2004, at 4:36 PM, Tony Weeg wrote: a weekend you can only assign 1-15, well 15 times :)  make sense?  its almost football season (well..american football

Re: javascript question

2004-08-16 Thread Dick Applebaum
Tony You pledged yourself to me, on this very list, several months ago Pouting... Dick On Aug 16, 2004, at 5:10 PM, Tony Weeg wrote: charlie... like they always say...if you had t*ts id kiss ya! thanks. perfect.  no need to make it any easier! [Todays Threads] [This Message]

  1   2   >