JavaScript - Adding Buttons To The Toggle Code
Code:
<script type="text/javascript" language="javascript"> function toggle() { var ele = document.getElementById("toggle"); var text = document.getElementById("display"); if(ele.style.display == "block") { ele.style.display = "none"; text.innerHTML = "Show"; } else { ele.style.display = "block"; text.innerHTML = "Hide"; } } </script> Code: <a href="javascript:toggle();" id="display" style="color:#000000">Show</a> <div id="toggle" style="display:none">CONTENT</div> The above toggle code works perfectly. How can I edit the code to use buttons instead of text? In other words: How can I replace two different texts that say "Show" and "Hide" with two different buttons that say "Show" and "Hide"? Thanks. Similar TutorialsHello. I'm really new to java script and could really use some help. What I'm trying to do is have 3 buttons on the header of my site fromm left to right. When one button is pressed a table or div drops down moving the site <body> and showing the content. Then if the same button is pressed it will close. Also when one of the other buttons are pressed the same drop down will happen and will close the others. Here is what I'm working with. This is one of the links/buttons. <div class="menu"> <ul> <li><a class="drop" href="#">Drop down</a></li> </ul> </div> This is what drops down <div id="dropdown" style="display:none;"> <div class="categories"><br/> <td>Content of drop here (100% with)</td> </div> </div> HEre is the java script $(document).ready(function(){$('a.drop').click(function(){$('#drop').toggle(200);return false;});$('a.refine').click(function(){ So this open and close (drop down drop up) fine but if I want three with the others closing when another is opened how would I do that? I'm using jqtransform and here's the function for the checkboxes. What code would I use the select/deselect all? Code: $.fn.jqTransCheckBox = function(){ return this.each(function(){ if($(this).hasClass('jqTransformHidden')) {return;} var $input = $(this); var inputSelf = this; //set the click on the label var oLabel=jqTransformGetLabel($input); oLabel && oLabel.click(function(){aLink.trigger('click');}); var aLink = $('<a href="#" class="jqTransformCheckbox"></a>'); //wrap and add the link $input.addClass('jqTransformHidden').wrap('<span class="jqTransformCheckboxWrapper"></span>').parent().prepend(aLink); //on change, change the class of the link $input.change(function(){ this.checked && aLink.addClass('jqTransformChecked') || aLink.removeClass('jqTransformChecked'); return true; }); // Click Handler, trigger the click and change event on the input aLink.click(function(){ //do nothing if the original input is disabled if($input.attr('disabled')){return false;} //trigger the envents on the input object $input.trigger('click').trigger("change"); return false; }); // set the default state this.checked && aLink.addClass('jqTransformChecked'); }); }; Hello everyone, I am totally new to javascript, I have a web form I designed using coffeecup, the form is very long about 4 pages long and it is all in one long scroll down the page, I was wondering if I can add page breaks and at the bottom of each categoty inserting a button for next and back whilst hiding the rest of the categories until next is clicked etc. until you reach submit. Please help in anyway you can?\ Yhanks K Hi there! Okay, here is my scenario: I have a link and a div on a webpage. With the link I want to toggle the content (HTML) of the div. On toggle, I want to load the content from a PHP-file and I want it to load on the toggle, not when the webpage originally loaded (to reduce loading time on the webpage itself). The file that is loaded on toggle doesn't have to be PHP, but it would help a lot. Does anybody know of a example of this or something similar to it? I have been looking for some time now, without any luck unfortunately. Highly appreciate any help/answers/feedback! I am trying to add tabindex values to buttons built in JavaScript as I did with accesskeys but having no luck--it disrupts my page layout. Anyone have suggestions? Here is the code I am working with: Code: function ObjButtonBuild() { this.css = buildCSS(this.name,this.x,this.y,this.w,this.h,this.v,this.z) this.div = '<' + this.divTag + ' id="'+this.name+'" style="text-indent:0;"></' + this.divTag + '>\n' this.divInt = '<a name="'+this.name+'anc" href="javascript:void(null)"' if(this.accessKeyValue && this.accessKeyValue!=null){ this.divInt+=' accessKey='+this.accessKeyValue+' '; } if( this.altName ) this.divInt += ' title="'+this.altName+'"' else if( this.altName != null ) this.divInt += ' title=""' this.divInt += '><img name="'+this.name+'Img" src="'+this.imgOffSrc if( this.altName ) this.divInt += '" alt="'+this.altName else if( this.altName != null ) this.divInt += '" alt="' this.divInt += '" width='+this.w+' height='+this.h+' border=0' if( !is.ns4 ) this.divInt += ' style="cursor:pointer"' this.divInt += '></a>' } Code: button41 = new ObjButton('button41',null,679,0,53,32,1,54,'div') button41.setImages('images/0807_help.jpg','images/0807_help_over.jpg','images/0807_help_over.jpg') button41.onUp = button41onUp button41.hasOnUp = true button41.capture=4 button41.setAccessKey(2) button41.setTabIndex(2) button41.build() I'm trying to add next and previous buttons to this slideshow done in jQuery. I've gotten stuck trying to figure it out with no progress. Could anyone help me out with this? Thanks. Here's the code: Code: $(document).ready(function(){ /* This code is executed after the DOM has been completely loaded */ var totWidth=0; var positions = new Array(); $('#slides .slide').each(function(i){ /* Traverse through all the slides and store their accumulative widths in totWidth */ positions[i]= totWidth; totWidth += $(this).width(); /* The positions array contains each slide's commulutative offset from the left part of the container */ if(!$(this).width()) { alert("Please, fill in width & height for all your images!"); return false; } }); $('#slides').width(totWidth); /* Change the cotnainer div's width to the exact width of all the slides combined */ $('#menu ul li a').click(function(e,keepScroll){ /* On a thumbnail click */ $('li.menuItem').removeClass('act').addClass('inact'); $(this).parent().addClass('act'); var pos = $(this).parent().prevAll('.menuItem').length; $('#slides').stop().animate({marginLeft:-positions[pos]+'px'},450); /* Start the sliding animation */ e.preventDefault(); /* Prevent the default action of the link */ // Stopping the auto-advance if an icon has been clicked: if(!keepScroll) clearInterval(itvl); }); $('#menu ul li.menuItem:first').addClass('act').siblings().addClass('inact'); /* On page load, mark the first thumbnail as active */ /***** * * Enabling auto-advance. * ****/ var current=1; function autoAdvance() { if(current==-1) return false; $('#menu ul li a').eq(current%$('#menu ul li a').length).trigger('click',[true]); // [true] will be passed as the keepScroll parameter of the click function on line 28 current++; } // The number of seconds that the slider will auto-advance in: var changeEvery = 7; var itvl = setInterval(function(){autoAdvance()},changeEvery*1000); /* End of customizations */ }); Hello. My difficulty is in adding Flash control buttons (play, stop, rewind, et cetera) to a window for playing movies. My initial code to create a window for the Shockwave/Flash player worked just fine: Code: <html> <head> <title>Movie Player Example</title> <script type="text/javascript"><!-- function playMovie(file){ var moviePlayer=window.open('assets/'&&file&&'', '', 'height=480,width=640,resizable=0,status=0,locationbar=0,menubar=0,top=200,left=350'); moviePlayer.document.write('<html><head><title>Movie Player</title>'); moviePlayer.document.write('<link rel="stylesheet" href="style.css">'); moviePlayer.document.write('</head><body"><center>'); moviePlayer.document.write('<object width="640" height="480">'); moviePlayer.document.write('<param name="movie" value="assets/'+file+'"></param>'); moviePlayer.document.write('<param name="wmode" value="transparent"></param>'); moviePlayer.document.write('<embed src="assets/'+file+'" type="application/x-shockwave-flash" wmode="transparent" width="640" height="480">'); moviePlayer.document.write('</embed></object>'); moviePlayer.document.write('</center></body></html>'); moviePlayer.document.close(); } //--></script> </head> <body> <p><a href="javascript:playMovie('mymovie.swf');">Create movie player window.</a></p> </body> </html> However, I then tried to add some of the material found on this webpage: http://www.permadi.com/tutorial/flashjscommand/ The resulting code: Code: <html> <head> <title>Movie Player Example</title> <script type="text/javascript"><!-- function playMovie(file){ var moviePlayer=window.open('assets/'&&file&&'', '', 'height=510,width=640,resizable=1,status=0,locationbar=0,menubar=0,top=200,left=350'); moviePlayer.document.write('<html><head><title>Movie Player</title>'); moviePlayer.document.write('<link rel="stylesheet" href="style.css">'); moviePlayer.document.write('<script type="text/javascript">'); moviePlayer.document.write('function getFlashMovieObject("assets/'&&file&&'"){var file=;if(window.document[file]){return window.document[file];}'); moviePlayer.document.write('if(navigator.appName.indexOf("Microsoft Internet")==-1){if(document.embeds && document.embeds[file])return document.embeds[file];}'); moviePlayer.document.write('else{return document.getElementById(file);}}'); moviePlayer.document.write('function movieControlPlay(){var flashMovie=getFlashMovieObject("assets/'+file+'"); flashMovie.Play();}'); moviePlayer.document.write('function movieControlStop(){var flashMovie=getFlashMovieObject("'&&file&&'"); flashMovie.StopPlay();}'); moviePlayer.document.write('function movieControlRewind(){var flashMovie=getFlashMovieObject("assets/'&&file&&'"); flashMovie.Rewind();}'); moviePlayer.document.write('</script>'); moviePlayer.document.write('</head><body><center>'); moviePlayer.document.write('<object width="640" height="480">'); moviePlayer.document.write('<param name="movie" value="assets/'+file+'"></param>'); moviePlayer.document.write('<param name="ShowControls" value="1">'); moviePlayer.document.write('<param name="wmode" value="transparent"></param>'); moviePlayer.document.write('<embed src="assets/'+file+'" type="application/x-shockwave-flash" wmode="transparent" width="640" height="480" pluginspage="http://www.macromedia.com/go/getflashplayer">'); moviePlayer.document.write('</embed></object>'); moviePlayer.document.write('<a href="javascript:movieControlPlay();"><img src="play.png" alt="Play" height="50" width="50" border="0" /></a> '); moviePlayer.document.write('<a href="javascript:movieControlStop();"><img src="stop.png" alt="Stop" height="50" width="50" border="0" /></a> '); moviePlayer.document.write('<a href="javascript:movieControlRewind();"><img src="rewind.png" alt="Rewind" height="50" width="50" border="0" /></a>'); moviePlayer.document.write('</center></body></html>'); moviePlayer.document.close(); } //--></script> </head> <body> <p><a href="javascript:playMovie('mymovie.swf');">Create movie player window.</a></p> </body> </html> Where the problem is: Code: moviePlayer.document.write('<script type="text/javascript">'); moviePlayer.document.write('function getFlashMovieObject("assets/'&&file&&'"){var file=;if(window.document[file]){return window.document[file];}'); moviePlayer.document.write('if(navigator.appName.indexOf("Microsoft Internet")==-1){if(document.embeds && document.embeds[file])return document.embeds[file];}'); moviePlayer.document.write('else{return document.getElementById(file);}}'); moviePlayer.document.write('function movieControlPlay(){var flashMovie=getFlashMovieObject("assets/'+file+'"); flashMovie.Play();}'); moviePlayer.document.write('function movieControlStop(){var flashMovie=getFlashMovieObject("'&&file&&'"); flashMovie.StopPlay();}'); moviePlayer.document.write('function movieControlRewind(){var flashMovie=getFlashMovieObject("assets/'&&file&&'"); flashMovie.Rewind();}'); moviePlayer.document.write('</script>'); And: Code: <p><a href="javascript:playMovie('mymovie.swf');">Create movie player window.</a></p> So it's just the sections dealing with the buttons and handling the buttons in the generated page header. Any help would be appreciated. Thanks. Hello, I have a script that lets you add tasks to a task list and then you can click a button to sort them, but I cannot get the "Delete Selected Task" and "Delete All Tasks" buttons to work correctly. I will be eternally indebted to whoever can help me fix these two buttons. The code I am working on is posted below. Thank you for your time. [CODE] <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <title>To Do List</title> <script type="text/javascript"> /* <![CDATA[ */ function addTask() { if (document.forms[0].newtask.value == "") window.alert("You must enter a value in the New Task field."); else { if (document.forms[0].tasks.options.value == "tasks") document.forms[0].tasks.options[0] = null; var newTask = new Option(); newTask.value = document.forms[0].newtask.value; newTask.text = document.forms[0].newtask.value; var numTasks = document.forms[0].tasks.options.length; document.forms[0].tasks.options[numTasks] = newTask; document.forms[0].newtask.value = ""; } } function deleteTask() { var selectedTask = 0; var taskSelected = false; while (selectedTask < document.forms[0].tasks.length) { if (document.forms[0].tasks.options[selectedTask].selected == true) { taskSelected = true; break; } ++selectedTask; } if (taskSelected == true) document.forms[0].tasks.options[selectedTasks] = null; else window.alert("You must select a task in the list."); } function ascendingSort() { var newTasks = new Array(); for (var i =0; i < document.forms[0].tasks.length; ++i) { newTasks[i] = document.forms[0].tasks.options[i].value; } newTasks.sort(); for (var j =0; j < document.forms[0].tasks.length; ++j) { document.forms[0].tasks.options[j].value = newTasks[j]; document.forms[0].tasks.options[j].text = newTasks[j]; } } /* ]]> */ </script> </head> <body> <h1>To Do List</h1> <form action=""> <p>New Task <input type="text" size="68" name="newtask" /></p> <p><input type="button" value="Add Task" onclick="addTask()" style="width: 150px" /> <input type="button" value="Delete Selected Task" onclick="deleteTask()" style="width: 150px" /> <input type="button" value="Delete All Tasks" onclick="document.forms[0].task.options.length = 0;" style="width: 150px" /><br /> <input type="button" value="Ascending Sort" onclick="ascendingSort()" style="width: 150px" /> </p> <p><select name="tasks" size="10" style="width: 500px"> <option value="tasks">Tasks</option></select></p> </form> </body> </html> [CODE] Hi guys, I am working on my first validation form and although the Submit button works fine and puts me to the landing page, I don't get the alert, when nothing is checked. Please look at my code and help if you can. I really don't need anything fancy, just working Code: <!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" /> <meta name="keywords" content="social media survey, social media, media survey, survey, danish media, danish media survey" /> <meta name="description" content="This survey is a school project, not an actual research. It has been designed to figure out the connection between the gender of the Danish users and their knowledge and usage of social media." /> <script language="JavaScript" type="text/javascript"></script> <script> function isRadioButtonSelected(radioGrpName, errorMsg){ var radios = document.getElementsByName(radioGrpName); var i; for (i=0; i<radios.length; i=i+1 ){ if (radios[i].checked){ return true; } } alert(errorMsg); return false; } function validate(){ if(isRadioButtonSelected('gender', 'please select your gender')){ return true; } return false; } </script> <title>The Social Media survey</title> <style type="text/css"> <!-- body { font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif; background: #8DC63F; margin: 0; padding: 0; color: #000; } } a img { border: none; } .container { width: 960px; margin: 0 auto; } .header { background: #FFF; margin-top: 30px; background-color:transparent; background-image:url(header.jpg); background-attachment: fixed; background-position:left center; background-repeat:no-repeat; } .content { padding-left: 50px; padding-right: 50px; padding-top: 30px; padding-bottom: 30px; background-color:#E7EFB9; font-family:Verdana, Geneva, sans-serif; font-size: 13px; } .footer { background: #FFF; } .fltrt { float: right; margin-left: 8px; } .fltlft { float: left; margin-right: 8px; } .clearfloat { clear:both; height:0; font-size: 1px; line-height: 0px; } </style> </head> <body> <div class="container"> <div class="header"><img src="header1.jpg" alt="The Social Media survey" width="960" height="175" /></div> <div class="content"> <form id="page1" action="http://projects.knord.dk/interaction/saveforminfo.aspx" onsubmit="return validate(); method="post"> <input type="hidden" name="surveyid" value="igakotra" /> <input type="hidden" name="landingpage" value="http://www.google.com" /> <input type="hidden" name="usecookie" value="true" /> <h3>1. Choose your gender</h3> <input type="radio" name="gender" value="male" id="male"/><label for "male">Male</label> <input type="radio" name="gender" value="female" id="female"/><label for "female">Female</label><br /><br /> <input type="submit" name="submit" value="Submit"/> </form> </div> <div class="footer"><a href="page1.html"><img src="1page.jpg" width="960" height="99" alt="1/6 pages" /></div> </div> </body> </html> I really need it asap... thanks guys, you're awesome I have been looking around for a while on google and have come accross a few things but still am unable to find the exact codes. I am trying to have a page setup so that when the user clicks a button it will add preset text to a form box and keep the chronological order of buttons that are clicked. This is going to be used for my ambulance service to assist dispatch so basically i am looking for preset buttons that the dispatcher can click disp. and have the dispatch and time added to a list in the form box that can later be copied and emailed to our cell phones. Thanks for any help. Basically, I have it so that when you click something, then it expands and then shows text. The part I am having trouble at is the text being a php include. Here is the line that works for pre-typed in information: Code: divbody.innerHTML = "Some random text here."; Then when I want to do something like this: Code: divbody.innerHTML = "<?php include('widgets/products.php'); ?>"; Then the actual innerHTML comes out like this: Code: <!--?php include('widgets/products.php'); ?--> It seems as if it is changing '<' and '>' to '<!--' and '-->' respectively. Hi I was wondering if it is possible to add js logging onto a webpage and have this writing out to a separate file with the details? I have a page which is only showing the header and not the rest of the page, I want to add loggin code to find out where it is breaking. Is this possible and how would I go about setting it up? I have a function to accept number and certain text only when "Enter" key is pressed. Code: function handleEnter(field, event){ var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode; var tmp_val = ""; if (keyCode == 13) { if(field.name=="number" && field.value.replace(/ /g,"").length>1){ field.value = field.value.replace(/ /g,""); field.value = field.value.toUpperCase(); tmp_val = field.value; if (isNaN(tmp_val) && tmp_val!="ABC") { field.value = ""; field.focus(); return false; } else { some codings here } } } } However, when I added a second condition, the code stops working Code: if (isNaN(tmp_val) && (tmp_val!="ABC" ||tmp_val!="DEF") ) Anyone pls help~ Tks~ Hi i have two images which are part of a rollover button that i want to have paused until the intro animation finishes. I have the javascript code but the rollover images are specified in the css. I just have the id to them in the html. I was wondering if anyone knew how to include the rollover files with the pausing javascript code. the files are profile.gif and profileover.gif. I tried to add the files to the preload part of the javascript but that didn't work. The website is www.creationindex.com/indextest.html thank you
Hi. I need help in adding a parenthesis in the area code of the phone number and validating it also. I made some javascript code but it is not working. Can somebody please help? I just need the code in adding () in the area code. For example: When user enter 10 digit number no spaces or dashes such as 0000000000 or 000-000-0000, I would like to have this format right away (000)000-0000. I know how to replace the characters but adding it is a tricky one for me. Can somebody please help? Thanks. Hello. Can anyone please tell me what information in the second java script code needs to be changed to make a toggle expand in place. The toggles currently expand properly, but the second toggle, as well as the others, jump back up to the first toggle when expanded. The first toggle: <script type="text/javascript">// <![CDATA[ function toggleView(layer_on, layer_off) { document.getElementById(layer_on).style.display = 'block'; document.getElementById(layer_off).style.display = 'none'; return; } // ]]></script> The second toggle: <script type="text/javascript">// <![CDATA[ function toggleView(layer_on, layer_off) { document.getElementById(layer_on).style.display = 'block'; document.getElementById(layer_off).style.display = 'none'; return; } // ]]></script> Here is the referenced page: http://sprintexperts.info/phones/# Thanks in advance! I am trying to toggle a button (button-top) to move 860px to the right when clicked, while a div panel (textbox1) with text slides down next to it. The panel toggles fine when the buttons (wrap or button-top) are clicked, but the button moves to the right, and then does not move back to its original position when the buttons are clicked the second time. I have tried so many different methods of coding this, but i have problems where the button keeps moving further to the right every time it is clicked. or when it does move back, it does it automatically (not on click) and suddenly disappears. Here is the code that I have ended up with so far. Code: $(function() { $("#textbox1").hide(); $("#wrap").click(function() { $("#button-top").animate({right: "860px"}, 2000); $('#textbox1').animate({height: "toggle"}, 2000); }); }); Hi all, looking for some help. I found this script that does almost everything i need. I have a form that has a small section of two radio buttons when you click on the first one i need a series of text boxes to open wrapped in a div box and that happens great, but when the other one is clicked i need them to go away, the whole div box. also the text boxes also have some hidden fields attached to them will not not pass to the shopping cart if the text boxes are disabled. here is what i have so far. placed in head Code: <SCRIPT LANGUAGE="JavaScript"> function toggle(chkbox, group) { var visSetting = (chkbox.checked) ? "visible" : "hidden" document.getElementById(group).style.visibility = visSetting }</script> part of the form having issues with Code: <span class="style30" style="text-align:center">Send directly to recipant:</span><input name="product3[]" type="radio" onclick="toggle(this, 'shipGroup');" value="{br}{b}SEND CERT DIRECTLY TO RECIPANT---{/b}"/> <br/> <center> <span class="style30">Send to me to give to the recipant:</span> <input name="product3[]" type="radio" value="{br}{b}SEND CERT TO ME TO GIVE TO RECIPANT---{/b}" /> </center> <input type="hidden" name="price3" value=".00" /> <input type="hidden" name="qty3" value="1" /> <input type="hidden" name="noqty3" value="3" /> <div id="shipGroup"><table width="616"> <tr> <td width="125" style="text-align:left"> <span class="style30">First Name</span> <input type="hidden" name="product3[]1" value="{br}FIRST NAME:" /></td> <td width="151"><input type="text" name="product3[]2" value=""/></td> <td width="147" style="text-align:right"><span class="style30" >Last Name</span> <input type="hidden" name="product3[]3" value="{br}LAST NAME:" /></td> <td width="173" style="text-align:left"><input type="text" name="product3[]4" value=""/></td></tr> <tr><td colspan="3" style="text-align:left"><span class="style30">Address</span> <input type="hidden" name="product3[]5" value="{br}ADDRESS:" /> <input type="text" name="product3[]6" value="" size="30"/></td> <td> </td> </tr> <tr><td colspan="2" style="text-align:left"><span class="style30">City</span> <input type="hidden" name="product3[]7" value="{br}CITY:" /><input type="text" name="product3[]8" value=""/></td> <td><span class="style30">State</span> <input type="hidden" name="product3[]9" value="{br}STATE:" /> <input type="text" name="product3[]10" value="" size="10"/></td> <td><span class="style30">Zip code</span> <input type="hidden" name="product3[]11" value="{br}ZIP CODE:" /> <input type="text" name="product3[]12" value="" size="5"/></td></tr></table> </div> please anyone with help will be great I had some help last week with a brands a to z list which shows a div containing list of brands starting with the relevant letter onclick. It works pretty well with one flaw. The brand links within the div seem to activate the toggle function. My wish is that the layer is shown when a letter is clicked but then hides on div onMouseOut so that a different letter can be selected. Here is by code; Javascript; Code: function toggle_visibility(o,id) { var obj = document.getElementById(id); obj.style.display=(obj.style.display == 'block')?'none':'block'; if (obj.style.display!='none') { obj.style.left=zxcPos(o)[0]+20+'px'; obj.style.top=zxcPos(o)[1]+20+'px';} } function zxcPos(obj){ var rtn=[0,0]; while(obj){ rtn[0]+=obj.offsetLeft; rtn[1]+=obj.offsetTop; obj=obj.offsetParent; } return rtn; } Here is a sample of my a to z table; Code: <table width="100%" border="0" cellspacing="2" cellpadding="2"> <tr> <td align="center" class="LN-Brands-Alphabox"><a href="#" onclick="toggle_visibility(this,'uniquename20');">U</a></td> <td align="center" class="LN-Brands-Alphabox"><a href="#" onclick="toggle_visibility(this,'uniquename21');">V</a></td> <td align="center" class="LN-Brands-Alphabox"><a href="#" onclick="toggle_visibility(this,'uniquename22');">W</a></td> <td align="center" class="LN-Brands-Alphabox"><a href="#" onclick="toggle_visibility(this,'uniquename23');">X</a></td> </tr> <tr> <td align="center" class="LN-Brands-Alphabox"><a href="#" onclick="toggle_visibility(this,'uniquename24');">Y</a></td> <td align="center" class="LN-Brands-Alphabox"><a href="#" onclick="toggle_visibility(this,'uniquename25');">Z</a></td> </tr></table> And here is an example of the Brand name div ; Code: <div id="uniquename21" onMouseOut="toggle_visibility('null','uniquename21');" style="display:none; position:absolute; border-style: solid; background-color: white; padding: 5px;"> <a href="Manufacturer-view.asp?ManID=43">VPX</a><br> <a href="Manufacturer-view.asp?ManID=44">Vyomax</a> </div> You can view the site on my test page; http://www.dp-development.co.uk/ProteinStop/site/ (Brand menu on the left nav) Thank you for any help you can give |