473,414 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

CSS make hidden layer visible with click

Im 14 yrs old and just make web sites for fun really, i use html css and java script at the moment but im just starting java. I live in Exeter in the uk. That me basicly.


My first question is-

Using css I've made a visible and hidden layer. Using Js i want to make the hidden layer visible by clicking on the visible layer.

I have tryed this:
<div id="box1" <a href="javascript:showLayer('box5');">
<span class="1"><center>Places to go</center></span>
</div> </a>

Box5 being the hidden box.

Any replises will be much appreichated and im sorry if this seems really simple.
Jun 20 '06 #1
1 16116
iam_clint
1,208 Expert 1GB
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. function swapform() {
  3.     var visable
  4.     var hidden
  5.     visable = document.getElementById("visible").innerHTML;
  6.     hidden = document.getElementById("theform").innerHTML;
  7.     document.getElementById("visible").innerHTML = hidden;
  8. }
  9. </script>
  10.  
  11. <div id="visible">
  12. <input type="button" value="change form" onclick="swapform();">
  13. </div>
  14.  
  15.  
  16. <div id="theform" style="visibility: hidden">
  17. <form action="blah.asp" method="post">
  18. <table>
  19. <tr><td><input type="text" value="Insert Name">
  20. <tr><Td><input type="submit" value="rub a dub">
  21. </table>
  22. </form>
  23. </div>
  24.  
this is how i would do it..... i answered a very similar question under javascript on this site so hopefully this same code i made for him will help you good luck and if you have any questions about this let me know.
Jul 15 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Andrew | last post by:
I have a <div> section of text in my page that I want to make visible via an input check box associated with an OnClick javascript. I can do this OK but the problem is that the space for the hidden...
2
by: Jon | last post by:
Hi all, I am trying to create a page that contains a number of div elements, with links on the left side of the page allowing the user to select which div to display. Some of the pages contain...
1
by: tabert | last post by:
I want to use JavaScript when a button is clicked to show and hide a SPAN or DIV. This works in both IE and Netscape, but what I'd like to happen is for there to be no white space where the hidden...
2
by: ckerns | last post by:
How can I check to see if a layer is visible? I have four layers and I want to check each to use in an if...then...else statement. tia
10
by: web_design | last post by:
I'm making a form that is hidden until someone clicks on a link to open it. I can hide the form, but there is just a large white space on the screen where the form is hiding. Is there any way to...
19
by: Oliver Neumann | last post by:
Hello, im new to c# and i got an app with a notifyicon. Now i want to start the app only with the notifyIcon, so that the Main-Form doesnt show up. The form itself is used at the entrance...
6
by: =?Utf-8?B?L2Rldi9udWxs?= | last post by:
Hello, i am using visual studio 2003 enterprise architect version. I am making apps for the .Net framework 1.1. While testing an interface, i discovered something strange. In this application...
2
by: Spizzat2 | last post by:
I've got a web page with some hidden elements that can be shown through various methods. What I'd like is, when the user tries to copy the visible stuff on the page, it doesn't copy the hidden...
4
by: vershner | last post by:
HI there, is it possible to make an element hidden, then make it visible again in the same function? I have a number of elements, only one of which should be visible at any time. The users can...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.