HTML - How Can You Apply Same Dhtml Java Menu To All Webpages?
HELLO ALL! I'm new here. Thank you in advanced.
I have a dthml menu on my main page. I would like to apply this same menu to all my other web pages with making one update. Currently I have the same code pasted and and script on all my product pages. If I have any changes to make to the menu I have to go and update all 20+ pages with the changes of the drop down menu. on each of my product pages is there any way to reference this one dthml menu to use...I'm hoping this is making sense? I'm using dreamweaver CS3 and I used Sothink's DHTML MENU creator. I'd like it that when I make a change to the dhtml menu it would apply to all my product pages. Thank you Chris Similar TutorialsHello, I'm looking for a DHTML script that will combine a floating menu with a slide in menu. Here's an example of a floating menu: http://www.dynamicdrive.com/dynamici...staticmenu.htm Here's an example of a slide in menu: http://www.dynamicdrive.com/dynamici...lideinmenu.htm Does anybody know where I can get a menu that combines these features? Hey guys I am build ing a site and wanted to no the best solution for a drop down menu system. I read somewhere that 10% of people of javascript disabled so they would not be able to use the javascript dropdown. Is the best option to use dhtml for this so it will work in all browsers old and new. Matt I have this menu to rollover... and I cant seem to get the positioning correct. All I want to do is shift it to the right about 100px so that it doesnt cover up the rest of the menu items. I will paste the CSS, javascript, and html code here... I have tried positioning it via CSS and thats not working :/ Is there a way to do it in the java code? Or if you want you can say how you would do it in CSS... maybe I just was doing it wrong. CSS Code: #dropmenudiv{ position:absolute; border:1px solid black; border-bottom-width: 0; font:normal 12px Verdana; line-height:18px; z-index:100; } #dropmenudiv a{ width: 100%; display: block; text-indent: 3px; border-bottom: 1px solid black; padding: 1px 0; text-decoration: none; font-weight: bold; } #dropmenudiv a:hover{ color:#000000; background-color: #cc0000; } JAVA Code: <script type="text/javascript"> var menu1=new Array() menu1[0]='<a href="group.html">About (group)</a>' menu1[1]='<a href="officers.html">Current Officers</a>' menu1[2]='<a href="officerjoin.html">Become an Officer</a>' var menu2=new Array() menu2[0]='<a href="meetings.html">Meetings</a>' menu2[1]='<a href="alumniday.html">Alumni Day</a>' menu2[2]='<a href="industryday.html">Industry Day</a>' var menuwidth='165px' var menubgcolor='lightyellow' var disappeardelay=50 var hidemenu_onclick="yes" var ie4=document.all var ns6=document.getElementById&&!document.all if (ie4||ns6) document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>') function getposOffset(what, offsettype){ var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop; var parentEl=what.offsetParent; while (parentEl!=null){ totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop; parentEl=parentEl.offsetParent; } return totaloffset; } function showhide(obj, e, visible, hidden, menuwidth){ if (ie4||ns6) dropmenuobj.style.left=dropmenuobj.style.top="-500px" if (menuwidth!=""){ dropmenuobj.widthobj=dropmenuobj.style dropmenuobj.widthobj.width=menuwidth } if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover") obj.visibility=visible else if (e.type=="click") obj.visibility=hidden } function iecompattest(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body } function clearbrowseredge(obj, whichedge){ var edgeoffset=0 if (whichedge=="rightedge"){ var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15 dropmenuobj.contentmeasure=dropmenuobj.offsetWidth if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure) edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth } else{ var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18 dropmenuobj.contentmeasure=dropmenuobj.offsetHeight if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up? edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge } } return edgeoffset } function populatemenu(what){ if (ie4||ns6) dropmenuobj.innerHTML=what.join("") } function dropdownmenu(obj, e, menucontents, menuwidth){ if (window.event) event.cancelBubble=true else if (e.stopPropagation) e.stopPropagation() clearhidemenu() dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv populatemenu(menucontents) if (ie4||ns6){ showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth) dropmenuobj.x=getposOffset(obj, "left") dropmenuobj.y=getposOffset(obj, "top") dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px" dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px" } return clickreturnvalue() } function clickreturnvalue(){ if (ie4||ns6) return false else return true } function contains_ns6(a, b) { while (b.parentNode) if ((b = b.parentNode) == a) return true; return false; } function dynamichide(e){ if (ie4&&!dropmenuobj.contains(e.toElement)) delayhidemenu() else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget)) delayhidemenu() } function hidemenu(e){ if (typeof dropmenuobj!="undefined"){ if (ie4||ns6) dropmenuobj.style.visibility="hidden" } } function delayhidemenu(){ if (ie4||ns6) delayhide=setTimeout("hidemenu()",disappeardelay) } function clearhidemenu(){ if (typeof delayhide!="undefined") clearTimeout(delayhide) } if (hidemenu_onclick=="yes") document.onclick=hidemenu </script> HTML Code: <li><a href="events.html" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu2, '150px')" onMouseout="delayhidemenu()">Events</a> </li> Any help would be appreciated! Thanks! How to create explorer like menu in Html or java script? eg + Game(inside this Cricket and Football) when click on + sign it become like-- - Game -Cricket -Football Can anybody suggest me, by which command I can do it? Commercial Removals || Removals and Storage||Specialist Removals Hello, I had a pretty basic html site that I made then one of my customers offered to spruce it up a bit. I gave him the go-ahead but told him that it had to be in html for search engine indexing. He did not build it in html, rather java (or maybe a combo - regardless, it is over my head). After launching it, I have watched it go backward in the search engines. Keywords, etc are at 100%. I tried to make a site map using the automatic generator from xmlsitemaps.com, but only three pages are found. So, not only are the robots not indexing it, apparently it does not follow "normal" programing that xmlsitemaps follows. Someone suggested adding html links under each java link in my menu. For example, here is a current link in my menu: <li><a href="javascript:getView( 'buyers' )">Buyers</a></li> If making an html link, I would reference the full path to the "buyers" page like this: <a href="http://clearchoicehi.com/index.php?c=Index/getView&v=buyers>Buyers</a> But if I did that, I would have two "Buyers" showing. Any way to do something like an ALT tag for the java and place the html in the ALT tag? Or should I just add a seperate menu somewhere in html? My site is NCinspector.com Thanks for your help. Which you think i should go with if I am using drop down menus for my site? CSS dropdown or Java? There is a lot of nifty programs out there that generate this dropdown menu for you, but what are the disadvantages? Should I create using CSS in the page itself, which seems more difficult to do and more time consuming... Hello everyone. I'm not sure what type of menu this is called, and I believe it's Javascript, but I'm just not sure. What it is is a menu that just shows the top level, but when you click on it, it drops down to show you a sub-level. Does anyone know what this type of menu is called? Any help is greatly appreciated. Thanks! This is something that I would expect every web developer has gone through when there at the point of almost finishing their website. I am almost done my website which has liek 4 sections meaning 4 pages Home, Downloads, Hacks and Info. These pages look about the same but just have different content. My question is what if I add a new image in to my websites and that image needs to be on all 4 pages does I have to open an edit the source all all 4 pages or is there some other option which can save a lot of my time. I have adobe dreamweaver if I can do it with that let me know! Thanks, I need to translate my English pages into different languages is there a way to do this...with a certain free program I created a website and its basic, but I want to be able to update news on the main page. I have a friend who is going to update the news but I dont really want her messing with files so is there a way to easily make a page that has a text box where she can enter text then press submit to add it to the main page? Something like this: Quote: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Update Text</title> </head> <body> <form id="form1" name="form1" method="post" action=""> <p> <label for="text">Enter text in the box below then when you are finished press the button below to<br /> add it to the new section in the main page. <br /> <br /> </label> <label for="textfield"></label> Subject: <input name="textfield" type="text" id="textfield" size="96" /> <label for="text"><br /> <br /> </label> <textarea name="text" cols="80" rows="9" id="text"></textarea> </p> <p> <input type="submit" name="Submit" id="Submit" value="Finished?" /> </p> </form> </body> </html> Hello, I am working on a website and having issue linking the contact and pricing page to the home page. When I click on Home from either pricing or contact page it's not moving. My code is attached Thanks Hey Just a quick question i'm new to creating websites and html, i've written the code for the website I was wondering how you add all the pages to your domain. ex. you have yourdomain.com how would you add yourdomain.com/page1 yourdomain.com/page2 and have it go to those pages? Thanks Josh Hi I have codes which are the same in a few HTML files. I'm wondering if there's an easier way to include the codes in every file without having to copy and paste them. I'm looking at a similar way, like ASP files, to include similar codes in asp files. Greetings everyone. I have a web page entirely made in tables, and I am trying to get it to automatically resize vertically. First post here. Hope someone can help. I need to embed a table into hundreds of websites. the data in the table changes frequently. I want to be able to alter the table in one place and it changes it on every website. What I've done, and it works well in Firefox, is create a separate html file with the table which resides on the server. Then I use this code in the host website <object data=http://www.web-source.net type="text/html" width="600" height="400"> <embed src=http://www.web-source.net width="600" height="400"> </embed> Error: Embedded data could not be displayed. </object> It will not register in IE though. Works fine in Firefox. Any ideas as to how to solve this or a better easier way to do this?? Thanks in advance. Rich I am in a band and I'm trying to figure out how to display reoccuring show/ gig information in a side menu on everypage on our website. Right now I am retyping the show list on 25 different pages when ever we get a new show. I think iFrames would be a good solution, but I don't really want to work with iframes as it doesn't view for some people. Unless anyone knows a new version of iframes that works fine for all browsers. You can head to our page http://www.apothys.us if you want to see what I'm talking about. Also, on firefox, the lineup of the graphics are shifted on some pages. It looks fine on IE. Can anyone bring some incite on this problem? how do i change the name the browser gives my site, becuase it just reads untitled document in the tab and top of the window. any help would be greatly appreciated I'm trying to make a site where people can post information. Similar to something like facebook where people enter in fields and then those fields instantly become a profile. I can figure out how to write the form etc., but what I need help on is how to get it to open into a new page. Is this DHTML? If not, can anyone tell me the formal name, so I can try to find it and learn it? Or if someone could just tell me how, that would be great too. Thanks! Dear friend, What is the difference between HTML & DHTML?give me some explanation about it. Thanks in advance |