HTML - Hide Content Based On Drop Down Link
Hello,
I have a html page and a drop down menu on top. The drop down menu is for like users. The user has to pick their role and based on that, the page will only show some parts of the content. So I have the drop down on top (e.g Developer, Editor, etc) and based on what they pick, hide the contents that they're not supposed to see. Is this possible with HTML? What do I need to do? Similar TutorialsHey i have a drop down menu...when i select a particular name from it...it should hide all the other content on the page other than the header <h3> being selected and the content of h3...which can either be encloded in <br> or <table> tag Hi, I am working on a form. The second question depends on what the user has selected for the first question, so I have managed to set it to "Hidden" onload. This works fine. The first question is a drop-down menu option, and depending on the answer given will determine weather question 2 needs answering. I can get question to appear, if the user selects an answer needing question two answering. But if they make a mistake and decide to change the answer, question 2 won't hide again. Here is the script and html: Code: <script language=javascript type='text/javascript'> function hidediv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hideshow').style.visibility = 'hidden'; } else { if (document.layers) { // Netscape 4 document.hideshow.visibility = 'hidden'; } else { // IE 4 document.all.hideshow.style.visibility = 'hidden'; } } } function showdiv() { if (document.getElementById) { // DOM3 = IE5, NS6 document.getElementById('hideshow').style.visibility = 'visible'; } else { if (document.layers) { // Netscape 4 document.hideshow.visibility = 'visible'; } else { // IE 4 document.all.hideshow.style.visibility = 'visible'; } } } </script> <body id="tt13" onload="javascript:hidediv()"> Code: <li> <h3> Services Required</h3> <label for="website">What services will you need?<br /> <select name="website" class="textarea" id="websites" onchange="javascript:showdiv()"> <option selected="selected" onchange="javascript:hidediv()">Please Choose:</option> <option onchange="javascript:showdiv()">Web Site Only</option> <option onchange="javascript:showdiv()">Web Site & Hosting</option> <option onchange="javascript:showdiv()">Web Site & Domain</option> <option onchange="javascript:showdiv()">Web Site, Hosting & Domain</option> <option onchange="javascript:hidediv()">None of These</option> </select> </label> </li> <li id="hideshow"> <br /> How many pages do you think will you need?<br /> <select name="Pages" class="textarea"> <option value="#" selected="selected">Please Choose:</option> <option>1</option> <option>2</option> <option>3</option> <option>4</option> <option>5</option> <option>6</option> <option>7</option> <option>8</option> <option>9</option> <option>10</option> <option>11</option> <option>12</option> <option>13</option> <option>14</option> <option>15</option> <option>16</option> <option>17</option> <option>18</option> <option>19</option> <option>20+</option> <option>I'm Not Sure.</option> </select> </li> I think it's something I've set wrong in onchange"" etc.. I've tried "onclick". Any ideas why the menu won't hide again? i currently have a javascript to hide and unhide content http://www.danish.wep.dk/film.html HTML Code: <script type="text/javascript"> function toggleDiv() { if (document.getElementById("myDivBox").style.display == "block") { document.getElementById("myDivBox").style.display = "none"; } else { document.getElementById("myDivBox").style.display = "block"; } } </script> HTML Code: <input type="button" value="PK" onclick="toggleDiv()"> <div id="myDivBox" align="center" style="display:none;"> <input type="button" value="Zamorak Godsword lured by #Danish" onclick="toggleDiv()"> <div id="myDivBox2" align="center" style="display:none;"> <object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/CzV_HAwOSwA&hl=en_US&fs=1&"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/CzV_HAwOSwA&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object> </div> .... .. . the problem is that i would like an additional hide funktion, but this script dosn't seem to support that, so basicly i would like the category to be called PK and then it should be divided again into groups of 1 video (named the same as the video) _________ im also open for other suggestions Okay, I am completely lost on this one. I need to create a string of code that will allow a user to submit a certain value into a form field. Then, when they click the submit button, they are taken to a specific page based on the value that they entered??? This has to be HTML only, hence my problem. Basically, this is a poor-mans online account system. A customer enters their account number into the form field, hits the submit button and are taken to their account page which is password protected. I know, I know, this could be easily done with PHP or using simple htaccess but I have to use HTML only on this one. So here's hoping you fine people will be able to help me I've found similar things, but not like this. I have a HTML Form, just a normal simple form, the data is sent using POST method to PHP, PHP has a thank you page, I get the E-Mail easy! >> Boring Part Start << This website is a online booking form for holidays in Cornwall, UK. People enter there info, then the party info. The thing is people in the party could be 1, could be 5, could be 8, or even just 2. >> Boring Part End << I Want A Drop Down Menu that will be able to hide forms or show forms So, it goes like this Title First Name Last Name Date Of Birth [field] [field] [field] [field] [field] [field] [field] [field] [field] [field] [field] [field] But I want it so, if someone picks the number 1 from this drop down list, only the first row of forms, or if someone picks 5, it shows 5 rows and if someone clicks 2, it only shows 2. I was wondering if I could use the Drop Down to hide DIV's or something and put each row in a DIV. Oh and btw, the fields are in tables at the moment. I made that more complicated then I should off ... lol. My HTML skill isn't that good, but I'll get my hands dirty if I must. Jme I have not touched HTML for months, now work brings me back to it. Simple question. I am using images as links. I don't want any symbol active or visited link around the image. How do I simply get rid of this. Thanks! I know there's got to be a pretty easy way to do this but I am having difficulties. I'm making a FAQ for my website, and all I want to do is have a list of questions, and you can click the question and the answer will appear directly underneath it. Then if you click the question again, the answer will become hidden. Sounds easy enough right? How do I do it? im makeing a page to store files.. how do i hide the page link so it doesnt show the categories (btw my index is .com/*****/*****/index.html) & if its possible to make it so that the browser doesnt show the category in history... (only .com) Thanks! Hey All! Am new to this HTML code been a VB programer for a while now!!! I am trying to enable radio buttons depending on what a use selects from a drop down combo box!!!!! help please here is what have already done!!! But this done not work!!!! <div> <select name="printer" size="1" id="printer" class="combo_box_txt"><?php /* onChange="ticket_print.submit(); */ ?> <option value="">Select Printer</option> <option value="KESW_LABELS2">ASM Printer</option> <option value="KESW_LABELS6">Buyers Printer</option> <option value="KESW_LABELS7">Reciving Printer</option> </select> </div> <?php if ( $printer == "") { ?> <strong>Select your ticket Size :</strong> <div> <input type="radio" name="size_ticket" id="size_ticket" value="_lge" disabled>Large <input type="radio" name="size_ticket" id="size_ticket" value="_med" disabled>Medium </div> <div class="submit"> <button style="font-size:20px; ; color:white; background-color:#FF0000; height:40px; width:120px;" name="publish_id" value="PRINT" type="submit" disabled>PRINT</button> <button style="font-size:20px; font-weight:bold; color:white; background-color:#FF0000; height:40px; width:120px;" name="publish_id" value="PDF" type="submit">PDF</button> </div> <?php } else { ?> </div> <strong>Select your ticket Size :</strong> <div> <input type="radio" name="size_ticket" id="size_ticket" value="_lge" checked>Large <input type="radio" name="size_ticket" id="size_ticket" value="_med" >Medium </div> <div class="submit"> <button style="font-size:20px; ; color:white; background-color:#FF0000; height:40px; width:120px;" name="publish_id" value="PRINT" type="submit" >PRINT</button> <button style="font-size:20px; font-weight:bold; color:white; background-color:#FF0000; height:40px; width:120px;" name="publish_id" value="PDF" type="submit">PDF</button> </div> <?php } ?> thanks in advance!!! Hi guys, First of all, I'd like to apologize for my writing skills as I'm from a non english-speaking country and I moved to Australia not long ago. Anyway, I'm trying to help a friend developing a website and I'm having some trouble getting the page to look like what he wants. I am an absolute rookie in website development and I'm discovering Dreamweaver as I speak. I managed to understand a few concepts based on what I know in VBA in Excel and tried to use some templates I found on the net. The last part didn't go really well and I decided to get rid of what I tried to make my explanations as clear as possible. Basically, I have a drop down menu on the left side of the page that works quite well at the moment.Wwhat I want to do is : the user goes over the first link of the drop down menu (called "General for Sale" under the section "Buying") and when he clicks on it, he loads on the right side the content of another page called "generalforsale.html. All of this obviously without refreshing the whole page and with the option of clicking on another section from the drop down menu to load another page... And all of this knowing that I'd like one specific page to be displayed on the left when the user first arrives on the website that would then be replaced by a page, depending on what he selects from the drop down menu. I have honestly tried everything I found and could understand, unsuccessfully... I have attached a lighter version of what I'm trying to do in case one of you guys has the time to have a look. I completely understand if this is not the policy of the forum and therefor apologize in advance. Thanks for reading me and for your help :-) Sub Hi Is there a way to hide my url when a user clicks on a link on my page that directs them to another site? Basically I don't want other web-sites to see that visitors came from my website. Hi... I am doing online streaming webpage...so, i gave the coding like this <TD vAlign=top><TD width="100%"> <P align=center> <EMBED name=mediaplayer1 pluginspage=http://www.microsoft.com/Windows/MediaPlayer/ align=center src=mms://wma1.viastreaming.net/cricket width=488 height=370 type=application/x-mplayer2 controller="true" loop="0" transparentstart="1" autostart="true" EnableContextMenu="false" showstatusbar="1"></P></TD> but, in most cases, visiters can get the mms://wma1.viastreaming.net/cricket l, go for the link inside the site's source code. so, please could you tell me how do i hide that mms protocol link in to my sourse code. thanks Hi there, I'm experiencing a strange problem in IE with the show-hide layers behavior. I have 4 layers, each with images inside them which are meant to link to other pages. This works fine in Firefox but not so in IE. The odd thing is that when you hover over the images in IE the link appears in the status bar and if you right click and choose "open link" it does work. The site is here www.patons.org/v2/ and its the images at the top that I'm talking about. Any help would be much appreciated. Thanks, Alex On my website I am trying to make a drop down menu change a script below it. If you go to http://www.breezybucks.com/article/newtemplate and click on "Custom Order Prizes" on the left you should see a drop down menu and an amazon flash file below it. I want it to be so that when you change from "Video Games" to "Electronics", it will load another flash file (from an already made amazon script). Here is my script right now... Quote: <select NAME="amazon"> <option>Video Games</option> <option>Electronics</option> <option>Books</option> </select> <Amazon Flash Script> <2nd Amazon Flash Script> Any idea how to do this? Hi guys! I need to show the content of a html link (<a href>) in an iframe placed into div tags, hiding the content between the divs when I click the link . I do the following : heading.html Code: <a href="http://maps.google.es target="centre">Where are </a> and in the div placed behind of the link , I do the following: index.html Code: <div id="centre"> <iframe src="../html/heading.html" name="centre"> --> <form action="../Fillm" method="post"> ... </form> </iframe> </div> But the page appears me duplicated, one above and the other page behind this one, and when I click the link, the content appears me in the behind page. I would be grateful if somebody could help me, because I am Stuck. Bye Hello All, Sorry to ask for help on my first visit. Is there any way to link drop down lists to each other using html? For example, the first drop down list would have states/counties. Once they select one, on the second drop down list it automatically generates all the towns in that county/state. It's meant to be part of a form for a website. Many thanks to all I don't have the ability to add an anchor to the page, it's not mine, but I'd like to link to a specific area on the page. Is that possible without that page having some sort of anchor already on it? I've looked all over the web and can't find an effective way to do this. Can someone please help? I need to make text drop down menus when you mouseover my links. This is a perfect example: http://www.stpatrick.org/ Thanks a lot! Hi All, I've been asked to make some hyperlinks that automatically select items in a drop down menu in a contact form. Is this possible if so, how is it done Thanks in advance Bluestreak So I'd like to have a 160*600 box with hyperlinks displaying only a headlines I select. I would like the bottom of the box to have arrows for navigating between sections of links that fit in the box with a place to enter a page number in between them. I would like it to begin with displaying the most recently posted links starting on the last page number with that being the first page it displays. I want the bottom of the box to include below the browsing chronological browsing feature an arrow facing left with the word "search" that would open a box with a place to type in text for it to search link headlines. At the bottom of the search box I would like an arrow facing down with the words "search by label". Yes, I would like to not only select a headline for each link but also categorically label them. If I could also select images for it to automatically fill the empty space with when a new page number is started that would be great, even better if it selects ones that fill the most depending on how long the headlines are. If it repeated headlines in extra page space instead of showing images that would be cool too. I'd also like it to automatically expand in height past 160*600 to make a new page number just for a headline that doesn't fit in 160*600. I need this in HTML. My blog is episin.blogspot.com |