RE: JS question / DOM hiding all elements in square area
This solution has only been tested in IE 6. There are a few little quirks in it because of the implementation but I didn't spend too much time cleaning it up http://www.islandwizards.com/tests/dhtml/simplemenu_selects.cfm HTH Donnie Bachan Phone: (718) 217-2883 ICQ#: 28006783 "Nitendo Vinces - By Striving You Shall Conquer" == The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. _ STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JS question / DOM hiding all elements in square area
Tell it to Microsoft... :) My suggestion would be to kill the selects and go with a dhtml lookalike dropdown. You can maintain the separation between your UI elements, without getting crazy with detecting where your elements are onscreen. -- jon mailto:[EMAIL PROTECTED] Monday, June 2, 2003, 12:21:39 PM, you wrote: w> OK thanks everyone, but I think I didn't ask the question correctly!! w> It is true you can usually stick in a fix to avoid issues. But I'm a nerd w> and as a nerd, I never (well nearly never) allow this kind of tight w> couple-ing in an app. IMHO an element like a menu should be responsible for w> it self. So in these case, the menu should be responable for dispaying w> properly. w> So in my world w> A menu hiding stuff under it to display = fine. (it has focus, the gui is w> behaving correctly) w> A select hiding itself if its under an open menu = crap. (it doesn't have w> focus, it doesn't carea about the menu) w> This kind of stuff makes it harder in the short term but means that the menu w> is self contained. If the main content of the page is changed later (and the w> menu remains the same) i want the menu to still work even if I add or remove w> a select from the page... w> Hope that clarifies my (nerdy) position :-) ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
WG, check out: http://www.milonic.co.uk/menu/ This is a self-contained js menu solution that should satisfy your geekiness (excuse me, nerdiness). There is a setting that you set inside the configuration portion of the js file that allows the menu to hide elements underneath it. If you still want to roll your own, at the very least you could parse their code and try to finger out how they did it. HTH. Sample of menus over form objects: http://www.milonic.co.uk/menu/overforms_sample.php ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
We had the same problem a while back on our site, but our designer insisted on the drop down menus, we tried several ways and came to your conclusion short term fixes may cause long term problems. Besides it niggles away at the back of you mind, "Damn I just didnt do that quite the way I wanted", http://www.andronics.co.uk we went with a re-design that kept everything away from that damn menu, we stuck in large gifs to take up the menu real-estate. -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 17:22 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area OK thanks everyone, but I think I didn't ask the question correctly!! It is true you can usually stick in a fix to avoid issues. But I'm a nerd and as a nerd, I never (well nearly never) allow this kind of tight couple-ing in an app. IMHO an element like a menu should be responsible for it self. So in these case, the menu should be responable for dispaying properly. So in my world A menu hiding stuff under it to display = fine. (it has focus, the gui is behaving correctly) A select hiding itself if its under an open menu = crap. (it doesn't have focus, it doesn't carea about the menu) This kind of stuff makes it harder in the short term but means that the menu is self contained. If the main content of the page is changed later (and the menu remains the same) i want the menu to still work even if I add or remove a select from the page... Hope that clarifies my (nerdy) position :-) Thanks All WG -Original Message- From: John McCosker [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 16:53 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area //In fact this would probably hide ALL selects on a page //document.getElementsByTagName('select').style.visibility = 'hidden'; Im not sure it would actually it may throw an error as it would be an array of select objects, this diagram would represent your cool menus menu item one | menu item two | menu item 3 | your select boxes just below - box 1 | box 2 | box 3 | - now I didnt know you can make select elements change visibility without being inside a div, but if you can, why not customise your event handler that triggers the menus, pass an extra value that represents each select box item in the select array array. menu 1 menu 2 menu 3 function killSelect(i){ document.getElementsByTagName["select"][i].style.visibility = 'hidden'; } function showSelect(i){ document.getElementsByTagName["select"][i].style.visibility = 'visible'; } otherwise embed the selects within divs giving the same id for each div and do function killSelect(i){ document.getElementById["divId"][i].style.visibility = 'hidden'; } function showSelect(i){ document.getElementById["divId"][i].style.visibility = 'visible'; } -----Original Message----- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 16:41 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Yes that will hide all selects on a page, but not only hide the one that are in region defined by top,left,width,height. In fact this would probably hide ALL selects on a page document.getElementsByTagName('select').style.visibility = 'hidden'; wg -Original Message----- From: Craig Dudley [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 16:21 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area This works in ie6, I assume it will work in any DOM Level 2 compliant browser, function hide(){ elements = document.getElementsByTagName('select'); for (var i = 0; i < elements.length; i++) { if (elements[i].style.visibility == 'visible') elements[i].style.visibility = 'hidden'; else elements[i].style.visibility = 'visible'; } } 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 15:26 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Basically I want to copy the functionality that coolmenus http://www.dhtmlcentral.com/projects/coolmenus/ does to hide selects, when a menu opens over them. The bit of code I want is just give me all then element within a region of the screen. I can then do if (elementtype = select) { hide element. } example template using coolmenus below == Coolmenus example - CoolMenus4 DHTML script made by Thomas Brattli from DHTMLCentral
RE: JS question / DOM hiding all elements in square area
I've not got time to test this but I think that the below method is sound and think it fits in with your viewpoint and it is pretty pseudo function init() { // Build up menu HTML var menuHTML = "<select"; document.writeMe.innerHTML = menuHTML; } function hideSelect() { document.writeMe.innerHTML = ''; } function showSelect() { init(); } Click me From: webguy [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 17:22 > To: CF-Talk > Subject: RE: JS question / DOM hiding all elements in square area > > > OK thanks everyone, but I think I didn't ask the question correctly!! > > It is true you can usually stick in a fix to avoid issues. > But I'm a nerd and as a nerd, I never (well nearly never) > allow this kind of tight couple-ing in an app. IMHO an > element like a menu should be responsible for it self. So in > these case, the menu should be responable for dispaying properly. > > So in my world > > A menu hiding stuff under it to display = fine. (it has > focus, the gui is behaving correctly) A select hiding itself > if its under an open menu = crap. (it doesn't have focus, it > doesn't carea about the menu) > > This kind of stuff makes it harder in the short term but > means that the menu is self contained. If the main content of > the page is changed later (and the menu remains the same) i > want the menu to still work even if I add or remove a select > from the page... > > Hope that clarifies my (nerdy) position :-) > > Thanks All > > WG > > -----Original Message----- > From: John McCosker [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 16:53 > To: CF-Talk > Subject: RE: JS question / DOM hiding all elements in square area > > > //In fact this would probably hide ALL selects on a page > //document.getElementsByTagName('select').style.visibility = 'hidden'; > > Im not sure it would actually it may throw an error as it > would be an array of select objects, > > this diagram would represent your cool menus > > > menu item one | menu item two | menu item 3 | > > your select boxes just below > - > box 1 | box 2 | box 3 | > - > > now I didnt know you can make select elements change > visibility without being inside a div, but if you can, why > not customise your event handler that triggers the menus, > pass an extra value that represents each select box item in > the select array array. > > onMouseOut="coolmenusHandlers();showSelect(0);">menu 1 > onMouseOut="coolmenusHandlers();showSelect(1);">menu 2 > onMouseOut="coolmenusHandlers();showSelect(2);">menu 3 > > function killSelect(i){ > > document.getElementsByTagName["select"][i].style.visibility = > 'hidden'; } function showSelect(i){ > > document.getElementsByTagName["select"][i].style.visibility = > 'visible'; } > > otherwise embed the selects within divs giving the same id > for each div and do > > function killSelect(i){ > document.getElementById["divId"][i].style.visibility = > 'hidden'; } function showSelect(i){ > document.getElementById["divId"][i].style.visibility = > 'visible'; } > > -Original Message- > From: webguy [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 16:41 > To: CF-Talk > Subject: RE: JS question / DOM hiding all elements in square area > > > Yes that will hide all selects on a page, but not only hide > the one that are in region defined by top,left,width,height. > > In fact this would probably hide ALL selects on a page > > document.getElementsByTagName('select').style.visibility = > 'hidden'; wg > > -Original Message- > From: Craig Dudley [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 16:21 > To: CF-Talk > Subject: RE: JS question / DOM hiding all elements in square area > > > This works in ie6, I assume it will work in any DOM Level 2 > compliant browser, > > > function hide(){ > elements = document.getElementsByTagName('select'); > for (var i = 0; i < elements.length; i++) { > if (elements[i].style.visibility == 'visible') > elements[i].style.visibility = 'hidden'; > else > eleme
RE: JS question / DOM hiding all elements in square area
OK thanks everyone, but I think I didn't ask the question correctly!! It is true you can usually stick in a fix to avoid issues. But I'm a nerd and as a nerd, I never (well nearly never) allow this kind of tight couple-ing in an app. IMHO an element like a menu should be responsible for it self. So in these case, the menu should be responable for dispaying properly. So in my world A menu hiding stuff under it to display = fine. (it has focus, the gui is behaving correctly) A select hiding itself if its under an open menu = crap. (it doesn't have focus, it doesn't carea about the menu) This kind of stuff makes it harder in the short term but means that the menu is self contained. If the main content of the page is changed later (and the menu remains the same) i want the menu to still work even if I add or remove a select from the page... Hope that clarifies my (nerdy) position :-) Thanks All WG -Original Message- From: John McCosker [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 16:53 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area //In fact this would probably hide ALL selects on a page //document.getElementsByTagName('select').style.visibility = 'hidden'; Im not sure it would actually it may throw an error as it would be an array of select objects, this diagram would represent your cool menus menu item one | menu item two | menu item 3 | your select boxes just below - box 1 | box 2 | box 3 | - now I didnt know you can make select elements change visibility without being inside a div, but if you can, why not customise your event handler that triggers the menus, pass an extra value that represents each select box item in the select array array. menu 1 menu 2 menu 3 function killSelect(i){ document.getElementsByTagName["select"][i].style.visibility = 'hidden'; } function showSelect(i){ document.getElementsByTagName["select"][i].style.visibility = 'visible'; } otherwise embed the selects within divs giving the same id for each div and do function killSelect(i){ document.getElementById["divId"][i].style.visibility = 'hidden'; } function showSelect(i){ document.getElementById["divId"][i].style.visibility = 'visible'; } -Original Message----- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 16:41 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Yes that will hide all selects on a page, but not only hide the one that are in region defined by top,left,width,height. In fact this would probably hide ALL selects on a page document.getElementsByTagName('select').style.visibility = 'hidden'; wg -Original Message----- From: Craig Dudley [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 16:21 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area This works in ie6, I assume it will work in any DOM Level 2 compliant browser, function hide(){ elements = document.getElementsByTagName('select'); for (var i = 0; i < elements.length; i++) { if (elements[i].style.visibility == 'visible') elements[i].style.visibility = 'hidden'; else elements[i].style.visibility = 'visible'; } } 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 15:26 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Basically I want to copy the functionality that coolmenus http://www.dhtmlcentral.com/projects/coolmenus/ does to hide selects, when a menu opens over them. The bit of code I want is just give me all then element within a region of the screen. I can then do if (elementtype = select) { hide element. } example template using coolmenus below == Coolmenus example - CoolMenus4 DHTML script made by Thomas Brattli from DHTMLCentral.com. Visit for more great scripts. /* DEFAULT STYLES NEEEDED START */ .clCMEvent{position:absolute; width:99%; height:99%; clip:rect(0,100%,100%,0); left:0; top:0; visibility:visible} .clCMAbs{position:absolute; visibility:hidden; left:0; top:0} /* DEFAULT STYLES NEEEDED END */ .clT,.clTover,.clS,.clSover,.clS2,.clS2over{position:absolute; width:120; font-family:arial,helvetica; cursor:pointer; cursor:hand; ;} .clT,.clTover{padding:4px; font-size:12px; font-weight:bold} .clS,.clSover{padding:2px; font-size:11px; font-weight:bold} .clS2,.clS2over{padding:2px; font-size:11px;} .clT,.clS,.clS2{color:#006699; b
RE: JS question / DOM hiding all elements in square area
//In fact this would probably hide ALL selects on a page //document.getElementsByTagName('select').style.visibility = 'hidden'; Im not sure it would actually it may throw an error as it would be an array of select objects, this diagram would represent your cool menus menu item one | menu item two | menu item 3 | your select boxes just below - box 1 | box 2 | box 3 | - now I didnt know you can make select elements change visibility without being inside a div, but if you can, why not customise your event handler that triggers the menus, pass an extra value that represents each select box item in the select array array. menu 1 menu 2 menu 3 function killSelect(i){ document.getElementsByTagName["select"][i].style.visibility = 'hidden'; } function showSelect(i){ document.getElementsByTagName["select"][i].style.visibility = 'visible'; } otherwise embed the selects within divs giving the same id for each div and do function killSelect(i){ document.getElementById["divId"][i].style.visibility = 'hidden'; } function showSelect(i){ document.getElementById["divId"][i].style.visibility = 'visible'; } -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 16:41 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Yes that will hide all selects on a page, but not only hide the one that are in region defined by top,left,width,height. In fact this would probably hide ALL selects on a page document.getElementsByTagName('select').style.visibility = 'hidden'; wg -----Original Message- From: Craig Dudley [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 16:21 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area This works in ie6, I assume it will work in any DOM Level 2 compliant browser, function hide(){ elements = document.getElementsByTagName('select'); for (var i = 0; i < elements.length; i++) { if (elements[i].style.visibility == 'visible') elements[i].style.visibility = 'hidden'; else elements[i].style.visibility = 'visible'; } } 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 15:26 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Basically I want to copy the functionality that coolmenus http://www.dhtmlcentral.com/projects/coolmenus/ does to hide selects, when a menu opens over them. The bit of code I want is just give me all then element within a region of the screen. I can then do if (elementtype = select) { hide element. } example template using coolmenus below == Coolmenus example - CoolMenus4 DHTML script made by Thomas Brattli from DHTMLCentral.com. Visit for more great scripts. /* DEFAULT STYLES NEEEDED START */ .clCMEvent{position:absolute; width:99%; height:99%; clip:rect(0,100%,100%,0); left:0; top:0; visibility:visible} .clCMAbs{position:absolute; visibility:hidden; left:0; top:0} /* DEFAULT STYLES NEEEDED END */ .clT,.clTover,.clS,.clSover,.clS2,.clS2over{position:absolute; width:120; font-family:arial,helvetica; cursor:pointer; cursor:hand; ;} .clT,.clTover{padding:4px; font-size:12px; font-weight:bold} .clS,.clSover{padding:2px; font-size:11px; font-weight:bold} .clS2,.clS2over{padding:2px; font-size:11px;} .clT,.clS,.clS2{color:#006699; background-color:#CDDBEB; layer-background-color:#CDDBEB;} .clTover{color:#FCCE55; background-color:#336699; layer-background-color:#336699;} .clSover{color:white; background-color:#339966; layer-background-color:#339966} .clS2{background-color:silver; width:230; layer-background-color:silver;} .clS2over{background-color:#00; width:230; layer-background-color:#00; color:black} .clStest{position:absolute; font-family:verdana; font-size:10px; color:red; layer-background-color:silver; background-color:silver;cursor:pointer; cursor:hand; } .clStestover{position:absolute; color:#33; font-weight:bold; font-family:courier; layer-background-color:#00ccff; background-color:#00ccff; cursor:pointer; cursor:hand; } .clB1{position:absolute; layer-background-color:#ff9933; background-color:#ff9933; visibility:hidden} .clB2{position:absolute; layer-background-color:#996600; background-color:#996600; visibility:hidden} .clB3{position:absolute; layer-background-color:red; background-color:red; visibility:hidden} .clB{position:absolute; background-color:#336699; layer-backgr
RE: JS question / DOM hiding all elements in square area
Nope, it doesn't. getElementsByTagName returns a node list (array), hence the loop. -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 16:41 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Yes that will hide all selects on a page, but not only hide the one that are in region defined by top,left,width,height. In fact this would probably hide ALL selects on a page document.getElementsByTagName('select').style.visibility = 'hidden'; wg -Original Message- From: Craig Dudley [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 16:21 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area This works in ie6, I assume it will work in any DOM Level 2 compliant browser, function hide(){ elements = document.getElementsByTagName('select'); for (var i = 0; i < elements.length; i++) { if (elements[i].style.visibility == 'visible') elements[i].style.visibility = 'hidden'; else elements[i].style.visibility = 'visible'; } } 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 15:26 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Basically I want to copy the functionality that coolmenus http://www.dhtmlcentral.com/projects/coolmenus/ does to hide selects, when a menu opens over them. The bit of code I want is just give me all then element within a region of the screen. I can then do if (elementtype = select) { hide element. } example template using coolmenus below == Coolmenus example - CoolMenus4 DHTML script made by Thomas Brattli from DHTMLCentral.com. Visit for more great scripts. /* DEFAULT STYLES NEEEDED START */ .clCMEvent{position:absolute; width:99%; height:99%; clip:rect(0,100%,100%,0); left:0; top:0; visibility:visible} .clCMAbs{position:absolute; visibility:hidden; left:0; top:0} /* DEFAULT STYLES NEEEDED END */ .clT,.clTover,.clS,.clSover,.clS2,.clS2over{position:absolute; width:120; font-family:arial,helvetica; cursor:pointer; cursor:hand; ;} .clT,.clTover{padding:4px; font-size:12px; font-weight:bold} .clS,.clSover{padding:2px; font-size:11px; font-weight:bold} .clS2,.clS2over{padding:2px; font-size:11px;} .clT,.clS,.clS2{color:#006699; background-color:#CDDBEB; layer-background-color:#CDDBEB;} .clTover{color:#FCCE55; background-color:#336699; layer-background-color:#336699;} .clSover{color:white; background-color:#339966; layer-background-color:#339966} .clS2{background-color:silver; width:230; layer-background-color:silver;} .clS2over{background-color:#00; width:230; layer-background-color:#00; color:black} .clStest{position:absolute; font-family:verdana; font-size:10px; color:red; layer-background-color:silver; background-color:silver;cursor:pointer; cursor:hand; } .clStestover{position:absolute; color:#33; font-weight:bold; font-family:courier; layer-background-color:#00ccff; background-color:#00ccff; cursor:pointer; cursor:hand; } .clB1{position:absolute; layer-background-color:#ff9933; background-color:#ff9933; visibility:hidden} .clB2{position:absolute; layer-background-color:#996600; background-color:#996600; visibility:hidden} .clB3{position:absolute; layer-background-color:red; background-color:red; visibility:hidden} .clB{position:absolute; background-color:#336699; layer-background-color:#336699; visibility:hidden} .clBar{position:absolute; width:10; height:10; visibility:hidden; layer-background-color:#336699; background-color:#336699;} .clNoLink{position:absolute; font-family:arial,helvetica;} .clNoLink2{position:absolute; padding:2px; font-size:11px; color:#006699; layer-background-color:silver; background-color:silver; font-family:arial,helvetica;} .clNoLink3{position:absolute; background-color:#CDDBEB; layer-background-color:#CDDBEB; font-family:arial,helvetica;} /*** ** Copyright (c) 2001 Thomas Brattli ([EMAIL PROTECTED]) DHTML coolMenus - Get it at coolmenus.dhtmlcentral.com Version 4.0_beta This script can be used freely as long as all copyright messages are intact. Extra info - Coolmenus reference/help - Extra links to help files CSS help: <a href="http://192.168.1.31/projects/coolmenus/reference.asp?m=37">http://192.168.1.31/projects/coolmenus/reference.asp?m=37</a> General: <a href="http://coolmenus.dhtmlcentral.com/reference.asp?m=35">http://coolmenus.dhtmlcentral.com/reference.asp?m=35</a> Menu properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=47">http://coolmenus.dhtmlcentral.com/properties.asp?m=47</a> Level properties:
RE: JS question / DOM hiding all elements in square area
Yes that will hide all selects on a page, but not only hide the one that are in region defined by top,left,width,height. In fact this would probably hide ALL selects on a page document.getElementsByTagName('select').style.visibility = 'hidden'; wg -Original Message- From: Craig Dudley [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 16:21 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area This works in ie6, I assume it will work in any DOM Level 2 compliant browser, function hide(){ elements = document.getElementsByTagName('select'); for (var i = 0; i < elements.length; i++) { if (elements[i].style.visibility == 'visible') elements[i].style.visibility = 'hidden'; else elements[i].style.visibility = 'visible'; } } 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 15:26 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Basically I want to copy the functionality that coolmenus http://www.dhtmlcentral.com/projects/coolmenus/ does to hide selects, when a menu opens over them. The bit of code I want is just give me all then element within a region of the screen. I can then do if (elementtype = select) { hide element. } example template using coolmenus below == Coolmenus example - CoolMenus4 DHTML script made by Thomas Brattli from DHTMLCentral.com. Visit for more great scripts. /* DEFAULT STYLES NEEEDED START */ .clCMEvent{position:absolute; width:99%; height:99%; clip:rect(0,100%,100%,0); left:0; top:0; visibility:visible} .clCMAbs{position:absolute; visibility:hidden; left:0; top:0} /* DEFAULT STYLES NEEEDED END */ .clT,.clTover,.clS,.clSover,.clS2,.clS2over{position:absolute; width:120; font-family:arial,helvetica; cursor:pointer; cursor:hand; ;} .clT,.clTover{padding:4px; font-size:12px; font-weight:bold} .clS,.clSover{padding:2px; font-size:11px; font-weight:bold} .clS2,.clS2over{padding:2px; font-size:11px;} .clT,.clS,.clS2{color:#006699; background-color:#CDDBEB; layer-background-color:#CDDBEB;} .clTover{color:#FCCE55; background-color:#336699; layer-background-color:#336699;} .clSover{color:white; background-color:#339966; layer-background-color:#339966} .clS2{background-color:silver; width:230; layer-background-color:silver;} .clS2over{background-color:#00; width:230; layer-background-color:#00; color:black} .clStest{position:absolute; font-family:verdana; font-size:10px; color:red; layer-background-color:silver; background-color:silver;cursor:pointer; cursor:hand; } .clStestover{position:absolute; color:#33; font-weight:bold; font-family:courier; layer-background-color:#00ccff; background-color:#00ccff; cursor:pointer; cursor:hand; } .clB1{position:absolute; layer-background-color:#ff9933; background-color:#ff9933; visibility:hidden} .clB2{position:absolute; layer-background-color:#996600; background-color:#996600; visibility:hidden} .clB3{position:absolute; layer-background-color:red; background-color:red; visibility:hidden} .clB{position:absolute; background-color:#336699; layer-background-color:#336699; visibility:hidden} .clBar{position:absolute; width:10; height:10; visibility:hidden; layer-background-color:#336699; background-color:#336699;} .clNoLink{position:absolute; font-family:arial,helvetica;} .clNoLink2{position:absolute; padding:2px; font-size:11px; color:#006699; layer-background-color:silver; background-color:silver; font-family:arial,helvetica;} .clNoLink3{position:absolute; background-color:#CDDBEB; layer-background-color:#CDDBEB; font-family:arial,helvetica;} /*** ** Copyright (c) 2001 Thomas Brattli ([EMAIL PROTECTED]) DHTML coolMenus - Get it at coolmenus.dhtmlcentral.com Version 4.0_beta This script can be used freely as long as all copyright messages are intact. Extra info - Coolmenus reference/help - Extra links to help files CSS help: <a href="http://192.168.1.31/projects/coolmenus/reference.asp?m=37">http://192.168.1.31/projects/coolmenus/reference.asp?m=37</a> General: <a href="http://coolmenus.dhtmlcentral.com/reference.asp?m=35">http://coolmenus.dhtmlcentral.com/reference.asp?m=35</a> Menu properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=47">http://coolmenus.dhtmlcentral.com/properties.asp?m=47</a> Level properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=48">http://coolmenus.dhtmlcentral.com/properties.asp?m=48</a> Background bar properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=49">http:/
RE: JS question / DOM hiding all elements in square area
This works in ie6, I assume it will work in any DOM Level 2 compliant browser, function hide(){ elements = document.getElementsByTagName('select'); for (var i = 0; i < elements.length; i++) { if (elements[i].style.visibility == 'visible') elements[i].style.visibility = 'hidden'; else elements[i].style.visibility = 'visible'; } } 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 15:26 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Basically I want to copy the functionality that coolmenus http://www.dhtmlcentral.com/projects/coolmenus/ does to hide selects, when a menu opens over them. The bit of code I want is just give me all then element within a region of the screen. I can then do if (elementtype = select) { hide element. } example template using coolmenus below == Coolmenus example - CoolMenus4 DHTML script made by Thomas Brattli from DHTMLCentral.com. Visit for more great scripts. /* DEFAULT STYLES NEEEDED START */ .clCMEvent{position:absolute; width:99%; height:99%; clip:rect(0,100%,100%,0); left:0; top:0; visibility:visible} .clCMAbs{position:absolute; visibility:hidden; left:0; top:0} /* DEFAULT STYLES NEEEDED END */ .clT,.clTover,.clS,.clSover,.clS2,.clS2over{position:absolute; width:120; font-family:arial,helvetica; cursor:pointer; cursor:hand; ;} .clT,.clTover{padding:4px; font-size:12px; font-weight:bold} .clS,.clSover{padding:2px; font-size:11px; font-weight:bold} .clS2,.clS2over{padding:2px; font-size:11px;} .clT,.clS,.clS2{color:#006699; background-color:#CDDBEB; layer-background-color:#CDDBEB;} .clTover{color:#FCCE55; background-color:#336699; layer-background-color:#336699;} .clSover{color:white; background-color:#339966; layer-background-color:#339966} .clS2{background-color:silver; width:230; layer-background-color:silver;} .clS2over{background-color:#00; width:230; layer-background-color:#00; color:black} .clStest{position:absolute; font-family:verdana; font-size:10px; color:red; layer-background-color:silver; background-color:silver;cursor:pointer; cursor:hand; } .clStestover{position:absolute; color:#33; font-weight:bold; font-family:courier; layer-background-color:#00ccff; background-color:#00ccff; cursor:pointer; cursor:hand; } .clB1{position:absolute; layer-background-color:#ff9933; background-color:#ff9933; visibility:hidden} .clB2{position:absolute; layer-background-color:#996600; background-color:#996600; visibility:hidden} .clB3{position:absolute; layer-background-color:red; background-color:red; visibility:hidden} .clB{position:absolute; background-color:#336699; layer-background-color:#336699; visibility:hidden} .clBar{position:absolute; width:10; height:10; visibility:hidden; layer-background-color:#336699; background-color:#336699;} .clNoLink{position:absolute; font-family:arial,helvetica;} .clNoLink2{position:absolute; padding:2px; font-size:11px; color:#006699; layer-background-color:silver; background-color:silver; font-family:arial,helvetica;} .clNoLink3{position:absolute; background-color:#CDDBEB; layer-background-color:#CDDBEB; font-family:arial,helvetica;} /*** ** Copyright (c) 2001 Thomas Brattli ([EMAIL PROTECTED]) DHTML coolMenus - Get it at coolmenus.dhtmlcentral.com Version 4.0_beta This script can be used freely as long as all copyright messages are intact. Extra info - Coolmenus reference/help - Extra links to help files CSS help: <a href="http://192.168.1.31/projects/coolmenus/reference.asp?m=37">http://192.168.1.31/projects/coolmenus/reference.asp?m=37</a> General: <a href="http://coolmenus.dhtmlcentral.com/reference.asp?m=35">http://coolmenus.dhtmlcentral.com/reference.asp?m=35</a> Menu properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=47">http://coolmenus.dhtmlcentral.com/properties.asp?m=47</a> Level properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=48">http://coolmenus.dhtmlcentral.com/properties.asp?m=48</a> Background bar properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=49">http://coolmenus.dhtmlcentral.com/properties.asp?m=49</a> Item properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=50">http://coolmenus.dhtmlcentral.com/properties.asp?m=50</a> **/ /*** ** Copyright (c) 2001 Thomas Brattli ([EMAIL PROTECTED]) Coolmenus
RE: JS question / DOM hiding all elements in square area
Ironically.that example at DHTMLCentral does not work. http://www.dhtmlcentral.com/projects/webcronize/examples/hide_selecboxes_and_form_example.html Another thoughthow about placing the element on a div then resizing the div (using the clip attribute), that would hide the element that is placed on it. The only problem the DIV must have a position attribute set to ABSOLUTE. HTH Donnie Bachan Phone: (718) 217-2883 ICQ#: 28006783 "Nitendo Vinces - By Striving You Shall Conquer" == The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
Ah ha, Now I see what youre trying to do. You basically know the size and position of the drop down menu and need to hide any select boxes its intersects while active, yes? Perhaps you could cheat a bit and give all your select boxes the same class and make them all invisible while the menu is active? -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 15:26 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Basically I want to copy the functionality that coolmenus http://www.dhtmlcentral.com/projects/coolmenus/ does to hide selects, when a menu opens over them. The bit of code I want is just give me all then element within a region of the screen. I can then do if (elementtype = select) { hide element. } example template using coolmenus below == Coolmenus example - CoolMenus4 DHTML script made by Thomas Brattli from DHTMLCentral.com. Visit for more great scripts. /* DEFAULT STYLES NEEEDED START */ .clCMEvent{position:absolute; width:99%; height:99%; clip:rect(0,100%,100%,0); left:0; top:0; visibility:visible} .clCMAbs{position:absolute; visibility:hidden; left:0; top:0} /* DEFAULT STYLES NEEEDED END */ .clT,.clTover,.clS,.clSover,.clS2,.clS2over{position:absolute; width:120; font-family:arial,helvetica; cursor:pointer; cursor:hand; ;} .clT,.clTover{padding:4px; font-size:12px; font-weight:bold} .clS,.clSover{padding:2px; font-size:11px; font-weight:bold} .clS2,.clS2over{padding:2px; font-size:11px;} .clT,.clS,.clS2{color:#006699; background-color:#CDDBEB; layer-background-color:#CDDBEB;} .clTover{color:#FCCE55; background-color:#336699; layer-background-color:#336699;} .clSover{color:white; background-color:#339966; layer-background-color:#339966} .clS2{background-color:silver; width:230; layer-background-color:silver;} .clS2over{background-color:#00; width:230; layer-background-color:#00; color:black} .clStest{position:absolute; font-family:verdana; font-size:10px; color:red; layer-background-color:silver; background-color:silver;cursor:pointer; cursor:hand; } .clStestover{position:absolute; color:#33; font-weight:bold; font-family:courier; layer-background-color:#00ccff; background-color:#00ccff; cursor:pointer; cursor:hand; } .clB1{position:absolute; layer-background-color:#ff9933; background-color:#ff9933; visibility:hidden} .clB2{position:absolute; layer-background-color:#996600; background-color:#996600; visibility:hidden} .clB3{position:absolute; layer-background-color:red; background-color:red; visibility:hidden} .clB{position:absolute; background-color:#336699; layer-background-color:#336699; visibility:hidden} .clBar{position:absolute; width:10; height:10; visibility:hidden; layer-background-color:#336699; background-color:#336699;} .clNoLink{position:absolute; font-family:arial,helvetica;} .clNoLink2{position:absolute; padding:2px; font-size:11px; color:#006699; layer-background-color:silver; background-color:silver; font-family:arial,helvetica;} .clNoLink3{position:absolute; background-color:#CDDBEB; layer-background-color:#CDDBEB; font-family:arial,helvetica;} /*** ** Copyright (c) 2001 Thomas Brattli ([EMAIL PROTECTED]) DHTML coolMenus - Get it at coolmenus.dhtmlcentral.com Version 4.0_beta This script can be used freely as long as all copyright messages are intact. Extra info - Coolmenus reference/help - Extra links to help files CSS help: <a href="http://192.168.1.31/projects/coolmenus/reference.asp?m=37">http://192.168.1.31/projects/coolmenus/reference.asp?m=37</a> General: <a href="http://coolmenus.dhtmlcentral.com/reference.asp?m=35">http://coolmenus.dhtmlcentral.com/reference.asp?m=35</a> Menu properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=47">http://coolmenus.dhtmlcentral.com/properties.asp?m=47</a> Level properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=48">http://coolmenus.dhtmlcentral.com/properties.asp?m=48</a> Background bar properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=49">http://coolmenus.dhtmlcentral.com/properties.asp?m=49</a> Item properties: <a href="http://coolmenus.dhtmlcentral.com/properties.asp?m=50">http://coolmenus.dhtmlcentral.com/properties.asp?m=50</a> **/ /*** ** Copyright (c) 2001 Thomas Brattli ([EMAIL PROTECTED]) Coolmenus add-in file for more advanced featuers.. **/ /*** This is the menu creati
RE: JS question / DOM hiding all elements in square area
7;','clStest',"clStestover") oM.makeMenu('1sub12','top1','Regular','','',150,30) oM.makeMenu('1sub13','top1','Different class','script/index.asp','',150,30,'','','clStest',"clStestover") oM.makeMenu('1sub14','top1','Subs aligned left','','',150,20,'','','','','left') oM.makeMenu('','1sub14','Item') oM.makeMenu('bb','1sub14','Subs aligned top','','',150,0,'','','','','top') oM.makeMenu('','bb','Item') oM.makeMenu('','bb','Item') oM.makeMenu('','1sub14','Item') oM.makeMenu('top2','','Align top','','',100,0,'','','','',"top",0) oM.makeMenu('2sub12','top2','Columns<br>aligned<br>topleft','','',94,70,'',' ','','','topleft') oM.makeMenu('','2sub12','Item') oM.makeMenu('','2sub12','Item') oM.makeMenu('','2sub12','Item') oM.makeMenu('','2sub12','Item') oM.makeMenu('','2sub12','Item') oM.makeMenu('','2sub12','Item') oM.makeMenu('2sub10','top2','','','',94,20,'img_sub.gif','img_sub_on.gif') oM.makeMenu('2sub11','top2','All scripts','script/index.asp','',94,20) oM.makeMenu('top3','','Align right','','',100,0,'','','','',"right") oM.makeMenu('3sub10','top3','No link item','','',150,30,'','','','','','',1) oM.makeMenu('3sub11','top3','Columns aligned bottom left','','',150,30,'','','','','bottomleft') oM.makeMenu('cc','3sub11','Align bottom','','',150,0,'','','','','bottom') oM.makeMenu('','cc','Item','','',150) oM.makeMenu('ff','cc','Align left with filter (ie only)<br>Go down for more add-in<br>effects','','',150,50,'','','','','left') oM.makeMenu('','ff','Item','','',130) oM.makeMenu('','ff','Item','','',130) oM.makeMenu('','ff','Item','','',130) oM.makeMenu('','ff','Item','','',130) oM.makeMenu('ee','ff','Align righttop with slide','','',130,0,'','','','','righttop') oM.makeMenu('','ee','Item','') oM.makeMenu('','ee','Nolink','','',0,0,'','','clNoLink2','','','',1) oM.makeMenu('','ee','Item','') oM.makeMenu('dd','ff','Align lefttop with slide','','',130,0,'','','','','lefttop') oM.makeMenu('','dd','Item','','',150) oM.makeMenu('','dd','Item','','',150) oM.makeMenu('gg','dd','Align bottom with clip','','',150,0,'','','','','bottom') oM.makeMenu('','gg','Item','','',150) oM.makeMenu('','gg','Item','','',150) oM.makeMenu('hh','gg','columns with clip','','',150,0) oM.makeMenu('','hh','Item','','',50) oM.makeMenu('','hh','Nolink','','',50,0,'','','clNoLink3','','','',1) oM.makeMenu('','hh','Item','','',50) oM.makeMenu('','hh','Item','','',50) oM.makeMenu('','3sub11','Item') oM.makeMenu('','3sub11','Item') oM.makeMenu('','3sub11','Item') oM.makeMenu('','3sub11','Item') oM.construct() Hide subs example: Turn of sub "0sub10" - oM.m['0sub10'].hide=1 Turn on sub "0sub10" - oM.m['0sub10'].hide=0 Turn of sub "0sub11" - oM.m['0sub11'].hide=1 Turn on sub "0sub11" - oM.m['0sub11'].hide=0 -Original Message- From: John McCosker [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 15:04 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area >>I want to hide all elements in a region (ie5+, nn6+) > That won't work either, I need to hide selects in this region. Due to an > issue in IE, select box show though divs, no matter what z-index they have. > I need terefore to make any select in this region hidden. This happens if the form elements are overlapping the divs and not contained within the divs, but peole are assuming you mean within, Can you prevent overlapping? Do select boxs appear and dissappear? A diagram would be good! -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:47 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area I know how to hide elements, in fact I know how to everything I need, but I'd prefer to use some code thats been tested etc . Basically the functionality is given top,left,width, and height , figure out the elements of type "select" that appear in this region and set style.visibilty = 'hidden' ( or visible) for each of them anyone know of any code to do this? Thansk WG -Original Message- From: Michael Tangorre [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:28 To: CF-Talk Subject: Re: JS question / DOM hiding all elements in square area using style sheets and JS events if needed change the visibility property. I forget the list of elements you can apply this to, but I am sure the table, tr, td, div, span work. visibility: hidden; If you need an example or more assistance, let me know. Mike - Original Message - From: "webguy" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, June 02, 2003 9:29 AM Subject: RE: JS question / DOM hiding all elements in square area > That won't work either, I need to hide selects in this region. Due to an > issue in IE, select box show though divs, no matter what z-index they have. > I need terefore to make any select in this region hidden. > > Thanks WG > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 14:21 > To: CF-Talk > Subject: Re: JS question / DOM hiding all elements in square area > > > webguy wrote: > > I want to hide all elements in a region (ie5+, nn6+) > > > > So I have these pixel values for the region > > > > left,top,weight,height > > > > What the easiest way to do this ? > > Create an empty div and apply a style to give it the right size, > position and z-index. > > Jochem > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
>>I want to hide all elements in a region (ie5+, nn6+) > That won't work either, I need to hide selects in this region. Due to an > issue in IE, select box show though divs, no matter what z-index they have. > I need terefore to make any select in this region hidden. This happens if the form elements are overlapping the divs and not contained within the divs, but peole are assuming you mean within, Can you prevent overlapping? Do select boxs appear and dissappear? A diagram would be good! -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:47 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area I know how to hide elements, in fact I know how to everything I need, but I'd prefer to use some code thats been tested etc . Basically the functionality is given top,left,width, and height , figure out the elements of type "select" that appear in this region and set style.visibilty = 'hidden' ( or visible) for each of them anyone know of any code to do this? Thansk WG -Original Message- From: Michael Tangorre [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:28 To: CF-Talk Subject: Re: JS question / DOM hiding all elements in square area using style sheets and JS events if needed change the visibility property. I forget the list of elements you can apply this to, but I am sure the table, tr, td, div, span work. visibility: hidden; If you need an example or more assistance, let me know. Mike - Original Message - From: "webguy" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, June 02, 2003 9:29 AM Subject: RE: JS question / DOM hiding all elements in square area > That won't work either, I need to hide selects in this region. Due to an > issue in IE, select box show though divs, no matter what z-index they have. > I need terefore to make any select in this region hidden. > > Thanks WG > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 14:21 > To: CF-Talk > Subject: Re: JS question / DOM hiding all elements in square area > > > webguy wrote: > > I want to hide all elements in a region (ie5+, nn6+) > > > > So I have these pixel values for the region > > > > left,top,weight,height > > > > What the easiest way to do this ? > > Create an empty div and apply a style to give it the right size, > position and z-index. > > Jochem > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
Soz for thinking aloud... but could you not dynamically write the HTML to a div layer when you want to show the select boxes (using document.myLayer.innerHTML = ' -Original Message- > From: webguy [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 15:01 > To: CF-Talk > Subject: RE: JS question / DOM hiding all elements in square area > > > Again a solid image in a div will still allow a select to > show though. This is due to a feature of IE > > The Problem is outlined here > http://www.webreference.com/dhtml/diner/seethru/ > > WG ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
Hi webguy... cheers for the link will keep it in mind when I get round to doing something like that and am tearing my hair out wishing that I had taken more note of this conversation! Hopes you get a result on this :-) ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
Again a solid image in a div will still allow a select to show though. This is due to a feature of IE The Problem is outlined here http://www.webreference.com/dhtml/diner/seethru/ WG -Original Message- From: David Collie (itndac) [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:50 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Why not have a hidden layer that is *not* transparent and toggle that on to hide the area and toggle it off to display it you could fill it with a solid image that will definitely hide the contents DC > -Original Message- > From: webguy [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 14:47 > To: CF-Talk > Subject: RE: JS question / DOM hiding all elements in square area > > > I know how to hide elements, in fact I know how to everything > I need, but I'd prefer to use some code thats been tested etc . > > Basically the functionality is > > given top,left,width, and height , figure out the elements of > type "select" that appear in this region and set > style.visibilty = 'hidden' ( or visible) for each of them > > > anyone know of any code to do this? > > Thansk WG > > -Original Message- > From: Michael Tangorre [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 14:28 > To: CF-Talk > Subject: Re: JS question / DOM hiding all elements in square area > > > using style sheets and JS events if needed change the > visibility property. I forget the list of elements you can > apply this to, but I am sure the table, tr, td, div, span work. > > visibility: hidden; > > If you need an example or more assistance, let me know. > > Mike > > > > ----- Original Message ----- > From: "webguy" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, June 02, 2003 9:29 AM > Subject: RE: JS question / DOM hiding all elements in square area > > > > That won't work either, I need to hide selects in this > region. Due to > > an issue in IE, select box show though divs, no matter what z-index > > they > have. > > I need terefore to make any select in this region hidden. > > > > Thanks WG > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Sent: 02 June 2003 14:21 > > To: CF-Talk > > Subject: Re: JS question / DOM hiding all elements in square area > > > > > > webguy wrote: > > > I want to hide all elements in a region (ie5+, nn6+) > > > > > > So I have these pixel values for the region > > > > > > left,top,weight,height > > > > > > What the easiest way to do this ? > > > > Create an empty div and apply a style to give it the right size, > > position and z-index. > > > > Jochem > > > > > > > > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
Okayeverytime I say something like this I can feel the cringe running through the community! *L* But here goes, this has been a very helpful guide for me in developing code to solve this problem. This is an IE specific solution but you will get the idea of what is being done to implement it on your own for whatever browser (NN6+ etc) On Microsoft.com, check out the toolbar.js script, there are two function hideElement(elmid) and showElement(elmID) these do what you want. You have to view the source of the page and grab the toolbar.js file. HTH Donnie Bachan Phone: (718) 217-2883 ICQ#: 28006783 "Nitendo Vinces - By Striving You Shall Conquer" == The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. _ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
Why not have a hidden layer that is *not* transparent and toggle that on to hide the area and toggle it off to display it you could fill it with a solid image that will definitely hide the contents DC > -Original Message- > From: webguy [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 14:47 > To: CF-Talk > Subject: RE: JS question / DOM hiding all elements in square area > > > I know how to hide elements, in fact I know how to everything > I need, but I'd prefer to use some code thats been tested etc . > > Basically the functionality is > > given top,left,width, and height , figure out the elements of > type "select" that appear in this region and set > style.visibilty = 'hidden' ( or visible) for each of them > > > anyone know of any code to do this? > > Thansk WG > > -Original Message- > From: Michael Tangorre [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 14:28 > To: CF-Talk > Subject: Re: JS question / DOM hiding all elements in square area > > > using style sheets and JS events if needed change the > visibility property. I forget the list of elements you can > apply this to, but I am sure the table, tr, td, div, span work. > > visibility: hidden; > > If you need an example or more assistance, let me know. > > Mike > > > > ----- Original Message ----- > From: "webguy" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Monday, June 02, 2003 9:29 AM > Subject: RE: JS question / DOM hiding all elements in square area > > > > That won't work either, I need to hide selects in this > region. Due to > > an issue in IE, select box show though divs, no matter what z-index > > they > have. > > I need terefore to make any select in this region hidden. > > > > Thanks WG > > > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Sent: 02 June 2003 14:21 > > To: CF-Talk > > Subject: Re: JS question / DOM hiding all elements in square area > > > > > > webguy wrote: > > > I want to hide all elements in a region (ie5+, nn6+) > > > > > > So I have these pixel values for the region > > > > > > left,top,weight,height > > > > > > What the easiest way to do this ? > > > > Create an empty div and apply a style to give it the right size, > > position and z-index. > > > > Jochem > > > > > > > > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
I know how to hide elements, in fact I know how to everything I need, but I'd prefer to use some code thats been tested etc . Basically the functionality is given top,left,width, and height , figure out the elements of type "select" that appear in this region and set style.visibilty = 'hidden' ( or visible) for each of them anyone know of any code to do this? Thansk WG -Original Message- From: Michael Tangorre [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:28 To: CF-Talk Subject: Re: JS question / DOM hiding all elements in square area using style sheets and JS events if needed change the visibility property. I forget the list of elements you can apply this to, but I am sure the table, tr, td, div, span work. visibility: hidden; If you need an example or more assistance, let me know. Mike - Original Message - From: "webguy" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, June 02, 2003 9:29 AM Subject: RE: JS question / DOM hiding all elements in square area > That won't work either, I need to hide selects in this region. Due to an > issue in IE, select box show though divs, no matter what z-index they have. > I need terefore to make any select in this region hidden. > > Thanks WG > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 14:21 > To: CF-Talk > Subject: Re: JS question / DOM hiding all elements in square area > > > webguy wrote: > > I want to hide all elements in a region (ie5+, nn6+) > > > > So I have these pixel values for the region > > > > left,top,weight,height > > > > What the easiest way to do this ? > > Create an empty div and apply a style to give it the right size, > position and z-index. > > Jochem > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JS question / DOM hiding all elements in square area
Michael Tangorre wrote: > using style sheets and JS events if needed change the visibility > property. I forget the list of elements you can apply this to, but I > am sure the table, tr, td, div, span work. > > visibility: hidden; That is the easy part. But unless you have hardcoded window size, font size, and positioned all elements using absolute positioning, you need to determine on the fly which elements are in the 'invisible' area. And it seems to me that would be tricky. Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
This works for me np. 1 -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:30 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area That won't work either, I need to hide selects in this region. Due to an issue in IE, select box show though divs, no matter what z-index they have. I need terefore to make any select in this region hidden. Thanks WG -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:21 To: CF-Talk Subject: Re: JS question / DOM hiding all elements in square area webguy wrote: > I want to hide all elements in a region (ie5+, nn6+) > > So I have these pixel values for the region > > left,top,weight,height > > What the easiest way to do this ? Create an empty div and apply a style to give it the right size, position and z-index. Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
>>No can't do that, there maybe any elements in the region.. can you not put per region in separate divs then, its hard to give a solution when I do not fully understand what your GUI wants to achieve in look and feel. J -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:11 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area No can't do that, there maybe any elements in the region.. WG -Original Message- From: Craig Dudley [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 13:58 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Stick them all in a container and make it invisible? -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:04 To: CF-Talk Subject: JS question / DOM hiding all elements in square area I want to hide all elements in a region (ie5+, nn6+) So I have these pixel values for the region left,top,weight,height What the easiest way to do this ? Thanks WG ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JS question / DOM hiding all elements in square area
using style sheets and JS events if needed change the visibility property. I forget the list of elements you can apply this to, but I am sure the table, tr, td, div, span work. visibility: hidden; If you need an example or more assistance, let me know. Mike - Original Message - From: "webguy" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Monday, June 02, 2003 9:29 AM Subject: RE: JS question / DOM hiding all elements in square area > That won't work either, I need to hide selects in this region. Due to an > issue in IE, select box show though divs, no matter what z-index they have. > I need terefore to make any select in this region hidden. > > Thanks WG > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 02 June 2003 14:21 > To: CF-Talk > Subject: Re: JS question / DOM hiding all elements in square area > > > webguy wrote: > > I want to hide all elements in a region (ie5+, nn6+) > > > > So I have these pixel values for the region > > > > left,top,weight,height > > > > What the easiest way to do this ? > > Create an empty div and apply a style to give it the right size, > position and z-index. > > Jochem > > > > > ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
That won't work either, I need to hide selects in this region. Due to an issue in IE, select box show though divs, no matter what z-index they have. I need terefore to make any select in this region hidden. Thanks WG -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:21 To: CF-Talk Subject: Re: JS question / DOM hiding all elements in square area webguy wrote: > I want to hide all elements in a region (ie5+, nn6+) > > So I have these pixel values for the region > > left,top,weight,height > > What the easiest way to do this ? Create an empty div and apply a style to give it the right size, position and z-index. Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: JS question / DOM hiding all elements in square area
webguy wrote: > I want to hide all elements in a region (ie5+, nn6+) > > So I have these pixel values for the region > > left,top,weight,height > > What the easiest way to do this ? Create an empty div and apply a style to give it the right size, position and z-index. Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
No can't do that, there maybe any elements in the region.. WG -Original Message- From: Craig Dudley [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 13:58 To: CF-Talk Subject: RE: JS question / DOM hiding all elements in square area Stick them all in a container and make it invisible? -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:04 To: CF-Talk Subject: JS question / DOM hiding all elements in square area I want to hide all elements in a region (ie5+, nn6+) So I have these pixel values for the region left,top,weight,height What the easiest way to do this ? Thanks WG ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: JS question / DOM hiding all elements in square area
Stick them all in a container and make it invisible? -Original Message- From: webguy [mailto:[EMAIL PROTECTED] Sent: 02 June 2003 14:04 To: CF-Talk Subject: JS question / DOM hiding all elements in square area I want to hide all elements in a region (ie5+, nn6+) So I have these pixel values for the region left,top,weight,height What the easiest way to do this ? Thanks WG ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4