HTML - Hide/unhide Text With A Link (for A Faq)
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? Similar TutorialsI'm pretty new to this whole HTML and PHP thing. I've had someone program my website for me, but I really don't want to have to pay him every time I want some little change made. So, my question is, is there a way in an HTML file to hide or unhide text by adding some command in the file? I would just like to have the headings for each section displayed, then the user could click a "read more" type button or something that would then display the text related to that heading, without refreshing the page. Something like this: Quote: THE FIRST HEADING read more THE SECOND HEADING read more Then, when you click on "read more", you would see this: Quote: THE FIRST HEADING Here's some text relating to this heading. And here's even more text. And still more. hide text THE SECOND HEADING read more Thanks in advance for your responses and help. Hey all. I'm looking for a way to hide and unhide an image. More specifically, I want a small box labeled as "Show", and once you click on that box, an image will be shown(and the box will now be labeled as "hide"). Then I click that box again which is now labeled as "hide" to hide the image. I'm sure you've all seen this on different websites. Hi Every one I new to this forum , but I hope some one can help me here. I have a html form where I need depending on the need using check box one field to be hidden and it is place the other one should be shown. Basically one field is dropdown data and the other is inputfield Idea is if the info is not in drpodown field then user select checkbow and insert data by hand. I be able to show and hide input field but input field do not go away I hope some one can assist me, I am not that strong in JavaScript Thanx in advance LA 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 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! 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! 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 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? 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 I've been having trouble trying to figure out how to get my hidden input tags to work. What I want: I have a section of Text I want to appear in the same page, After the user has clicked on a certain link. I do not want to make a similar page with the added text because that takes up too much space. I also need the simplest way to do this because I'll be repeating it many times all over my site. How do I do it?: Hi, I very badly need help in hiding text which i cannot control - meaning that the text appears on all of my pages, and it is not in the coding of the page. I keep getting the text "Free Hosting Provided by Company Name" on all my pages. When I make a html page or php page or whatever, it always has that text appearing somewhere in the page. When I press view source, the text appears. I must also tell you to clarify that I am not violatiing/ Breaking the Terms of Service given by the hosting company. I have checked throug the terms and it doesn't mentionanything. Infact on the homepage it says "NO ADS" & "No Links". Just letting u know so u don't waste time asking and For your own peace of mind, so u u know u r not doing something bad. The code must be text specific so that it only applies to that text in the page. Anyways, i am sure there is a solution to this. Maybe some use of CSS may help, but I am not sure. (like transparency, or change specific text colour to white?). Or Javascript? I don't know. Any questions? please ask. Thank You Very Much. Your Help is Appreciated! Hi guys. I have a block of text on a html page. I want users to be able to click on 'more' at the end of the paragraph and this will reveal a few more paraghraphs. I have it working in safari with the following code: HTML Code: some text here. <a onclick=" hiddenTxt.style.visibility = 'visible';">More.</a> <div id="hiddenTxt">the hidden text here</div> In my css page i state the visibility as being hidden. The user then clicks more and the txt appears. As i say this works in safari but not firefox or windows. Any suggestions of where iv gone wrong or of a better way of doing this. Many thanks. I want to show a brief description about something and have a link that says "Show Me More". When the user clicks the link, the rest of the text will appear right below it on the same page. EXAMPLE Elephants are large animals with 4 legs. (Show Me More) <!--Once user clicks "Show Me More", the following text appears--> Elephants bla bla bla bla bla bla bla bla bla bla bla the rest of the content here... END EXAMPLE How should I go about doing this? As an extra, if I want the content that is originally under "Show Me More" to slide down the page when the new text appears, how would I do that? can you show and hide layers with text? I know that you can use the behavior function on images to use it, but i just can't figure out how i can do it with text For example: have a layer in a HTML (hidden), when i put my mouse over a text "testing", it shows that layer, and vice-versa on mouse out. I found a way to show/hide text-tables-content (divs) in my page using a link, but unfortunately, when I hit that link, the page reloads to the top again, so if it is too long, I have to scroll down again and again... Can I reload page at the scrolling place I was before, or is there a better way to hide/show divs with mouseClick on link or picture? I use this in head tag: <script language="javascript"> <!-- var state = 'none'; function showhide(layer_ref) { if (state == 'block') { state = 'none'; } else { state = 'block'; } if (document.all) { //is IE 4 or 5 (or 6 beta) eval( "document.all." + layer_ref + ".style.display = state"); } if (document.getElementById &&!document.all) { hza = document.getElementById(layer_ref); hza.style.display = state; } } //--> </script> Also, my body looks like this...: <body> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> some text <br> <p><a href="#" onclick="showhide('div1');">Show/hide me</a></p> <div id="div1" style="display: none;">This is the content</div> <p><a href="#" onclick="showhide('div2');">Show/hide me</a></p> <div id="div2" style="display: none;"> <table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> </tr> </table> This is the content 222222</div> <p><a href="#" onclick="showhide('div3');">Show/hide me</a></p> <div id="div3" style="display: none;"> <table border="1"> <tr> <td>row 1, cell 1</td> <td>row 1, cell 2</td> <td>row 1, cell 3</td> <td>row 1, cell 4</td> <td>row 1, cell 5</td> </tr> <tr> <td>row 2, cell 1</td> <td>row 2, cell 2</td> <td>row 1, cell 3</td> <td>row 1, cell 4</td> <td>row 1, cell 5</td> </tr> </table> This is the content</div> </body> hi everyone ! I've an indented file text (directory to text, see example below ) that i need to convert in the fastest way possible to html with hide/show feature .. how can I manage this ? the list is very long and gets updated -- I i wouldnt want to do that manually .. any clue ? ex ARTIST1 CD1 1-song1 2-song2 CD2 1-song1 ARTIST2 CD3 1-song1 2-song2 CD4 1-song1 should become ARTIST1 ARTIST2 and if u click on ARTIST1 u get ARTIST1 CD1 CD2 ARTIST2 one more click on CD will show the tracks .. any idea ? thanks!F How do I Link text in a div, h1, h2, p to an external text file or xml file - I don't really know how to ask the question. I think I need an xml file that can be easily edited by a user saved to the server to update an xhtml page text without the user getting bogged down in html. I don't want to use joomla or cms. <Any ideas />? Best wishes, mas Hey guys, in IE my text is fine but if you open http://canapictures.com/cast.html in firefox all the text is blue and is linked... How do I change this? Hello, I am new here and relatively new to using HTML. I am a hardwood distributor and I am trying to get a text box and submit button that would allow a consumer to type in their zip code and have it link to a page that displays a list of our contractors. For example, a consumer navigates to our page looking to get their floor installed. They put their zip code in the text box, hit submit, and it brings them to a page that has names and contact info to installers in their area. I know I'll have to get a long list of zip codes, and I will need to have it link to another page that says "we have no installers in your area" if they input a zip code that is not in our distribution area. If anyone has an HTML script that I could use it would be greatly appreciated. Thank you so much! Brian |