OT: help with JavaScript accordion
I experimented with Joe Rinehart's jComponents accordion navigation and decided to write my own, both to learn how it works and because I want more precise control over the CSS. I've managed to fumble my way to a certain degree of success but I'm a little stuck. I would like only the first pane open on page load and only one page open at a time. Here's what I have so far - if you view source you can see my comments at lines 14 and 23. (and if the js totally sucks I wouldn't be hurt if you had other tips as well.) -Paul ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196107 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: help with JavaScript accordion
No code. But without looking at what you have, it sounds like you need to call a close event on all menu items except the one you clicked on. On page load you could call the onclick of the first item to open it. Ade -Original Message- From: Paul [mailto:[EMAIL PROTECTED] Sent: 23 February 2005 15:09 To: CF-Talk Subject: OT: help with JavaScript accordion I experimented with Joe Rinehart's jComponents accordion navigation and decided to write my own, both to learn how it works and because I want more precise control over the CSS. I've managed to fumble my way to a certain degree of success but I'm a little stuck. I would like only the first pane open on page load and only one page open at a time. Here's what I have so far - if you view source you can see my comments at lines 14 and 23. (and if the js totally sucks I wouldn't be hurt if you had other tips as well.) -Paul -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 ~| 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 today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196108 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: help with JavaScript accordion
Doh! My son woke up and distracted me from finishing the message. Here's what I meant to include. You can view the source to see where I'm going... http://www.malan.org/accordion.html -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 23, 2005 8:14 AM To: CF-Talk Subject: RE: help with JavaScript accordion No code. But without looking at what you have, it sounds like you need to call a close event on all menu items except the one you clicked on. On page load you could call the onclick of the first item to open it. Ade -Original Message- From: Paul [mailto:[EMAIL PROTECTED] Sent: 23 February 2005 15:09 To: CF-Talk Subject: OT: help with JavaScript accordion I experimented with Joe Rinehart's jComponents accordion navigation and decided to write my own, both to learn how it works and because I want more precise control over the CSS. I've managed to fumble my way to a certain degree of success but I'm a little stuck. I would like only the first pane open on page load and only one page open at a time. Here's what I have so far - if you view source you can see my comments at lines 14 and 23. (and if the js totally sucks I wouldn't be hurt if you had other tips as well.) -Paul -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 ~| 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 today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196113 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: help with JavaScript accordion
I like that! Here's a slightly changed version. I put IDs in the divs to help debug the flow of code, you don't need these though. It helped doing these a while back, it's built from an xml file and is similar to what you have with the opening and closing menu items. http://www.adrianlynch.co.uk/autotrade/menu_f_1.swf http://www.adrianlynch.co.uk/autotrade/menu_f_2.swf http://www.adrianlynch.co.uk/autotrade/menu_f_3.swf http://www.adrianlynch.co.uk/autotrade/menu_f_4.swf One change might be to make the code do both, close all items on opening another and leave them open, with only a change in the script. This doesn't work in Firefox. Are you planning on making it work on more browsers? Would be nice to see the finished product :O) Let me know how it works out. Ade /html head script language=JavaScript1.2 // Reference to all label divs var labels = new Array(); function buildAccordion() { allDivs = document.getElementById(accordion).getElementsByTagName(DIV); for ( var i = 0; i allDivs.length; i++ ) { var thisDiv = allDivs[i]; // Store label divs only and assign the onclick for each if ( thisDiv.className == label ) { labels[labels.length] = thisDiv; thisDiv.onclick = showHidePane; } } labels[0].parentNode.childNodes.item(1).style.display = block; } function closeAllPanes(node) { for ( var i = 0; i labels.length; i++ ) { var thisDiv = labels[i].parentNode.childNodes.item(1); //alert(thisDiv.id); if ( thisDiv != node ) { //alert(thisDiv.id); thisDiv.style.display = none; } } } function showHidePane() { var pane = this.parentNode.childNodes.item(1); closeAllPanes(this); if ( pane.style.display == block ) pane.style.display = none; else pane.style.display = block; } /script style #accordion{width:220px} div.panel {border:dashed silver 1px} div.label {border-bottom:dashed silver 1px;cursor:pointer} div.pane {display:none;cursor:default} /style /head body onload=buildAccordion() div id=accordion div class=panel id=pane_1 div class=label id=label_1panel 1/div div class=pane id=pane_1content 1br /br /br //div /div div class=panel id=pane_2 div class=label id=label_2panel 2/div div class=pane id=pane_2content 2br /br /br //div /div div class=panel id=pane_3 div class=label id=label_3panel 3/div div class=pane id=pane_3content 3br /br /br //div /div div class=panel id=pane_4 div class=label id=label_4panel 4/div div class=pane id=pane_4content 4br /br /br //div /div div class=panel id=pane_5 div class=label id=label_5panel 5/div div class=pane id=pane_5content 5br /br /br //div /div /div /body /html -Original Message- From: Paul [mailto:[EMAIL PROTECTED] Sent: 23 February 2005 16:02 To: CF-Talk Subject: RE: help with JavaScript accordion Doh! My son woke up and distracted me from finishing the message. Here's what I meant to include. You can view the source to see where I'm going... http://www.malan.org/accordion.html -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 22/02/2005 ~| 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 today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196173 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: help with JavaScript accordion
I like that! Here's a slightly changed version. Thanks for your help! I spent some more time this morning on it and we both came up with similar ways of doing it. Since I was able to open the one I clicked on I just elected to close them all and then open the one I want. (I liked your var names better so I switched some.) It works in Firefox, but it looks a little goofy - I must be doing something in the styles for the labels that isn't up to snuff. Here's my latest: http://www.malan.org/accordion.html -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 23, 2005 1:25 PM To: CF-Talk Subject: RE: help with JavaScript accordion ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196190 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: help with JavaScript accordion
Oo, I like that, looks very slick. Even FF is almost the same. Ade -Original Message- From: Paul [mailto:[EMAIL PROTECTED] Sent: 23 February 2005 21:45 To: CF-Talk Subject: RE: help with JavaScript accordion I like that! Here's a slightly changed version. Thanks for your help! I spent some more time this morning on it and we both came up with similar ways of doing it. Since I was able to open the one I clicked on I just elected to close them all and then open the one I want. (I liked your var names better so I switched some.) It works in Firefox, but it looks a little goofy - I must be doing something in the styles for the labels that isn't up to snuff. Here's my latest: http://www.malan.org/accordion.html -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 23, 2005 1:25 PM To: CF-Talk Subject: RE: help with JavaScript accordion ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:196193 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
help with javascript/query
I am at a loss as to how to do this, I have a shipping info page that that I want to give the user a choice of all the shipping addresses they have used in the past. I want to use JS and build an array to stop having to reload the page to do this. Here is what I need to do, any help is appreciated 1. When page is first loaded, the last used address will populate the field. 2. When the user chooses another address from the drop down, it will call the function and populate the fields with the chosen address from the array 3. If a user hits NEW all the fields will be cleared Thanks CF_SIGNATURE NAME=Douglas L. Brown EMAIL=[EMAIL PROTECTED] PHONE=714.538.6611 WEB=http://www.carnivorepc.com; ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: help with javascript/query
basically, do this make a bunch of hidden fields ... like S_name, S_address, S_city, S_state, and insert the value of the addresses this user used. repeat this x amount of times. X being the number of different addresses they used. this essentially creates an array. so lets say u have 3 different addresses. to, let's say, get the state from the third address, the object you would call is document.myform.state[2].value I assume you should understand the rest. if not, please send me your code and i will write it for you since it is hard to explain in text and too time consuming From: Douglas L. Brown [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: help with javascript/query Date: Thu, 15 Nov 2001 09:20:42 -0800 I am at a loss as to how to do this, I have a shipping info page that that I want to give the user a choice of all the shipping addresses they have used in the past. I want to use JS and build an array to stop having to reload the page to do this. Here is what I need to do, any help is appreciated 1. When page is first loaded, the last used address will populate the field. 2. When the user chooses another address from the drop down, it will call the function and populate the fields with the chosen address from the array 3. If a user hits NEW all the fields will be cleared Thanks CF_SIGNATURE NAME=Douglas L. Brown EMAIL=[EMAIL PROTECTED] PHONE=714.538.6611 WEB=http://www.carnivorepc.com; ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Help with Javascript!
Hi All, Is there a javascript mailing list as this one. Also, what is the best way to learn javascript ( in detail ) in three days. I have a project to do and I have to do intensive javascript programming. I don't know javascript at all (yet). Help! Thank You. __ Do You Yahoo!? Kick off your party with Yahoo! Invites. http://invites.yahoo.com/ -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: Help with Javascript!
Check out JS-Jive it was spawned by a list member here. Very good list - lots of experts. The email address is [EMAIL PROTECTED] Go to egroups.com and search js-jive. Duane -Original Message- From: jonathan hamner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 08, 2000 1:39 PM To: [EMAIL PROTECTED] Subject: Help with Javascript! Hi All, Is there a javascript mailing list as this one. Also, what is the best way to learn javascript ( in detail ) in three days. I have a project to do and I have to do intensive javascript programming. I don't know javascript at all (yet). Help! Thank You. __ Do You Yahoo!? Kick off your party with Yahoo! Invites. http://invites.yahoo.com/ -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Help with Javascript error
I am using a javascript windows.open to make a pop up windows when you open it. When you are in frames it won't work. Can anyone go to my website and tell me what's wrong? http://209.215.124.5/about/investor/frames.cfm Robert Everland III Web Developer Dixon Ticonderoga -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: Help with Javascript error
Dang forgot to tell you where to click. Click on the products section on the left. Robert Everland III Web Developer Dixon Ticonderoga -Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] Sent: Friday, July 21, 2000 2:23 PM To: '[EMAIL PROTECTED]' Subject: Help with Javascript error I am using a javascript windows.open to make a pop up windows when you open it. When you are in frames it won't work. Can anyone go to my website and tell me what's wrong? http://209.215.124.5/about/investor/frames.cfm Robert Everland III Web Developer Dixon Ticonderoga -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: Help with Javascript error
I think your problem is that you are confusing the browser... You have several nested ffames with the same name: FRAME NAME="content" frameset cols="170,124" FRAME NAME="content" .. FRAME NAME="content" .. /frameset /frameset Not to mention that you are using both CF and ASP ;-} Dick At 2:26 PM -0400 7/21/00, Robert Everland wrote: Dang forgot to tell you where to click. Click on the products section on the left. Robert Everland III Web Developer Dixon Ticonderoga -Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] Sent: Friday, July 21, 2000 2:23 PM To: '[EMAIL PROTECTED]' Subject: Help with Javascript error I am using a javascript windows.open to make a pop up windows when you open it. When you are in frames it won't work. Can anyone go to my website and tell me what's wrong? http://209.215.124.5/about/investor/frames.cfm Robert Everland III Web Developer Dixon Ticonderoga -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.