PDA

View Full Version : Centering Javascript Expanding Menu



jhoward
07 Mar 2010, 06:43 AM
Hello everyone,

I'm constructing an IT help page for my workplace, which is my first ever introduction to the world of web design. Having overcome a number of problems, I am now facing the biggest.

I've basically built (somehow!) a Javascript expanding menu, to work with a question and answer scenario. I found the code through an online tutorial.

The result of the code is as follows;

Menu 1 (Click here - this results in the 4 links being expanded below)
- Link
- Link
- Link
- Link
Menu 2 (Click here - this results in the 4 links being expanded below)
- Link
- Link
- Link
- Link

And so on....

The problem is, I don't want 4 links to be displayed all in one go as a result of clicking on the 'Menu' links. I only want ONE link to be displayed (the link will be the IT solution), and to then have the option of opening another solution from the previous solution. Yes....this sounds like double dutch!

So...an example of what I need.

Q. My PC isn't powering on-(This link will be clickable - which in turn will 'show' the answer)

A. Is the system powered on at the mains socket?

NOW - I need there to be an option to 'show' another solution if this answer to this is 'yes'.

So....

Q. My PC isn't powering on-(This link will be clickable - which in turn will 'show' the answer)

A. Is the system powered on at the mains socket? If yes, click to show the next solution.

A. Is the mains cable securely connected to the system? If yes, click to show the next solution.

And so on...anyone that could help? That is, if you haven't already pulled your hair out from this rather contrived way of explaining things! :smash:

Thanks folks. :)