User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 329,054 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,602 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 179 | Replies: 0
Reply
Join Date: May 2008
Posts: 1
Reputation: usagiyuri is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
usagiyuri usagiyuri is offline Offline
Newbie Poster

drop down navigation errors

  #1  
8 Days Ago
Hello,

Im having trouble getting a button to link to a banquet page, I know its probably somethign simple but i cant seem to figure it out


DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  1. <HTML>
  2. <HEAD>
  3. <TITLE> New Document </TITLE>
  4. <META NAME="Generator" CONTENT="EditPlus">
  5. <META NAME="Author" CONTENT="">
  6. <META NAME="Keywords" CONTENT="">
  7. <META NAME="Description" CONTENT="">
  8. <style type="text/css">
  9.  
  10. /* Sample CSS definition for the example list. Remove if desired */
  11. .dropmenudiv{
  12. position:absolute;
  13. background-color:#99CDFF;
  14. border:1px solid #04255A;
  15. font:bold 16px timesnewroman;
  16. color:#04255A;
  17. line-height:25px;
  18. z-index:100;
  19. text-align:center;
  20. }
  21.  
  22. .dropmenudiv a{
  23. display: block;
  24. text-indent: 1px;
  25. border: 1px solid #04255A;
  26. padding: 0px 2;
  27. text-decoration: none;
  28. font-weight: bold;
  29. color:#04255A;
  30. text-align:center;
  31. }
  32.  
  33. .dropmenudiv a:hover{ /*hover background color*/
  34. background-color: #99CDFF;
  35. display: block;
  36. text-indent: 1px;
  37. border-bottom: 1px solid #04255A;
  38. padding: 0px 2;
  39. text-decoration: none;
  40. font-weight: bold;
  41. color:#04255A;
  42. }
  43. .navlist
  44. {
  45. font-family:verdana;
  46. font-weight:bold;
  47. font-size:12px;
  48. color: #a4a4a4;
  49. line-height:25px;
  50. text-decoration:none;
  51. }
  52. .navlist a:hover
  53. {
  54. font-family:Sans Serif;
  55. font-weight:bold;
  56. font-size:12px;
  57. color: #ff0000;
  58. line-height:25px;
  59. text-decoration:none;
  60. }
  61.  
  62. .anylinkcss{
  63. position:absolute;
  64. visibility: hidden;
  65. border:1px solid gray;
  66. border-bottom-width: 0;
  67. font:normal 11px Sans Serif;
  68. line-height: 18px;
  69. z-index: 100;
  70. background-color: white;
  71. width: 205px;
  72. }
  73.  
  74. .anylinkcss a{
  75. color: black;
  76. width: 100%;
  77. display: block;
  78. text-indent: 3px;
  79. border-bottom: 1px solid gray;
  80. padding: 1px 0;
  81. text-decoration: none;
  82. font-weight: bold;
  83. text-indent: 5px;
  84. }
  85.  
  86. .anylinkcss a:hover{ /*hover background color*/
  87. background-color: #F8FBBD;
  88. color: black;
  89. }
  90. </style>
  91.  
  92.  
  93.  
  94. <script language="javascript">
  95. var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
  96. var enableanchorlink=0 //Enable or disable the anchor link when clicked on? (1=e, 0=d)
  97. var hidemenu_onclick=1 //hide menu when user clicks within menu? (1=yes, 0=no)
  98. var horizontaloffset=1 //horizontal offset of menu from default location. (0-5 is a
  99.  
  100. good value)
  101.  
  102. /////No further editting needed
  103.  
  104. var ie5=document.all
  105. var ns6=document.getElementById&&!document.all
  106.  
  107. function getposOffset(what, offsettype){
  108. var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
  109. var parentEl=what.offsetParent;
  110. while (parentEl!=null){
  111. totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft :
  112.  
  113. totaloffset+parentEl.offsetTop;
  114. parentEl=parentEl.offsetParent;
  115. }
  116. return totaloffset;
  117. }
  118.  
  119. function showhide(obj, e, visible, hidden){
  120. if (ie5||ns6)
  121. dropmenuobj.style.left=dropmenuobj.style.top=-500
  122. if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
  123. obj.visibility=visible
  124. else if (e.type=="click")
  125. obj.visibility=hidden
  126. }
  127.  
  128. function iecompattest(){
  129. return (document.compatMode && document.compatMode!="BackCompat")?
  130.  
  131. document.documentElement : document.body
  132. }
  133.  
  134. function clearbrowseredge(obj, whichedge){
  135. var edgeoffset=0
  136. if (whichedge=="rightedge"){
  137. var windowedge=ie5 && !window.opera?
  138.  
  139. iecompattest().scrollLeft+iecompattest().clientWidth-15 :
  140.  
  141. window.pageXOffset+window.innerWidth-15
  142. dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
  143. if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
  144. edgeoffset=dropmenuobj.contentmeasure+obj.offsetWidth+(horizontaloffset*2) //no space
  145.  
  146. to the right of page? Move menu over to the left
  147. }
  148. else{
  149. var topedge=ie5 && !window.opera? iecompattest().scrollTop : window.pageYOffset
  150. var windowedge=ie5 && !window.opera?
  151.  
  152. iecompattest().scrollTop+iecompattest().clientHeight-15 :
  153.  
  154. window.pageYOffset+window.innerHeight-18
  155. dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
  156. if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
  157. edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
  158. if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position
  159.  
  160. at top of viewable window then)
  161. edgeoffset=dropmenuobj.y
  162. }
  163. }
  164. return edgeoffset
  165. }
  166. function dropdownmenu(obj, e, dropmenuID){
  167. document.getElementById("cssexamples").style.color = "#ff0000";
  168. if (window.event) event.cancelBubble=true
  169. else if (e.stopPropagation) e.stopPropagation()
  170. if (typeof dropmenuobj!="undefined") //hide previous menu
  171. dropmenuobj.style.visibility="hidden"
  172. clearhidemenu()
  173. if (ie5||ns6){
  174. obj.onmouseout=delayhidemenu
  175. dropmenuobj=document.getElementById(dropmenuID)
  176. if (hidemenu_onclick)
  177.  
  178. dropmenuobj.onclick=function(){dropmenuobj.style.visibility='hidden'}
  179. dropmenuobj.onmouseover=clearhidemenu
  180. dropmenuobj.onmouseout=ie5? function(){ dynamichide(event)} : function(event){
  181.  
  182. dynamichide(event)}
  183. showhide(dropmenuobj.style, e, "visible", "hidden")
  184. dropmenuobj.x=getposOffset(obj, "left")
  185. dropmenuobj.y=getposOffset(obj, "top")
  186. dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj,
  187.  
  188. "rightedge")+obj.offsetWidth+horizontaloffset+"px"
  189. dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
  190. }
  191. return clickreturnvalue()
  192. }
  193.  
  194. function clickreturnvalue(){
  195. if ((ie5||ns6) && !enableanchorlink) return false
  196. else return true
  197. }
  198.  
  199. function contains_ns6(a, b) {
  200. while (b.parentNode)
  201. if ((b = b.parentNode) == a)
  202. return true;
  203. return false;
  204. }
  205.  
  206. function dynamichide(e){
  207. if (ie5&&!dropmenuobj.contains(e.toElement))
  208. delayhidemenu()
  209. else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget,
  210.  
  211. e.relatedTarget))
  212. delayhidemenu()
  213. }
  214.  
  215. function delayhidemenu(){
  216. delayhide=setTimeout("dropmenuobj.style.visibility='hidden'",disappeardelay)
  217. document.getElementById("cssexamples").style.color = "#a4a4a4";
  218. }
  219.  
  220. function clearhidemenu(){
  221. if (typeof delayhide!="undefined")
  222. clearTimeout(delayhide)
  223. }
  224. </script>
  225. </HEAD>
  226.  
  227. <BODY>
  228.  
  229. <table border=0 cellspacing=0 cellpadding=0>
  230. <tr>
  231. <td><a href="index.html"><img border="0"
  232.  
  233. src="_images/home.jpg"></a></td></tr>
  234. <tr>
  235. <td><a href="officers.html"><img border="0"
  236.  
  237. src="_images/officers.jpg"></a></td></tr>
  238.  
  239. <tr>
  240. <td><a href="amalgamates.html"><img border="0"
  241.  
  242. src="_images/amalgamate.jpg"></a></td>
  243. </tr>
  244.  
  245. <tr>
  246. <td><a href="negotiation.html"><img border="0"
  247.  
  248. src="_images/negotiation.jpg"></a></td></tr>
  249.  
  250. <tr>
  251. <td><a style="text-decoration: none;color:#a4a4a4;"
  252.  
  253. onMouseover="dropdownmenu(this, event, 'anylinkmenu1')" href="banquet.html"
  254.  
  255. onClick="return clickreturnvalue()" id="cssexamples"><img border="0"
  256.  
  257. src="_images/banguet.jpg"></a></td></tr>
  258.  
  259. <tr>
  260. <td><a href="contactus.html"><img border="0"
  261.  
  262. src="_images/contact.jpg"></a></td></tr>
  263. </table>
  264.  
  265. <div id="anylinkmenu1" class="dropmenudiv" style="width: 180px;visibility:hidden;">
  266. <a href="caterers.html">Caterers</a>
  267. <a href="pictures.html">Pictures</a>
  268. <a href="directions.html">Directions</a>
  269. </div>
  270. </BODY>
  271. </HTML>
Last edited by usagiyuri : 8 Days Ago at 11:57 am.
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Marketplace (Sponsored Links)
Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 5:50 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC