0

I'm not sure if javascript is the best solution but here's what i want to achieve. The web page is divided in 3 columns...

The left column should have links in picture format like Arts, History, Science etc Clicking on any of these link should generate a series of links in the rightmost column say clicking on history should generate links for Civilization, World war etc Science should generate links like Physics chemistry represented by pictures etc and so on

Finally Clicking on these links say World war should display the content in the central column giving a brief history on World war.... Also each time a user clicks on an image link say Science it should get highlighted so the user can navigate easily from one topic to another.

I'm a novice to programming, not sure if javascript is the best approach. Also I'm very confused as to how to go about this problem where to begin and how. Any help in terms of code chunks or references or algorithms or advice on how to approach this problem would be most appreciated. If solving this problem means learning a new programming language i'm open to try.....

In case if i'm not clear in explaining the problem let me know

1 Answer 1

2

JavaScript would be appropriate for this. The appropriate approach will depend on how much content you have.

If it's reasonably short, you can achieve all of this by simply changing the display property on your elements (use JavaScript to set the CSS of certain page elements to show (display:block) or to hide (display:none).

If you have pages of text, you may want to look into Ajax. It is a bit more advanced that simply showing and hiding elements that are already there.

Sign up to request clarification or add additional context in comments.

4 Comments

I strongly agree with this that you should try to achieve this with only CSS and bring it back to display whenever needed, make links in seperate div's hide them and bring them back whenever user clicks the appropriate link.
Thanks Jack & AurA, i think i'll have to look into Ajax based on your suggestion, any pointers which areas i should explore. does this procedure have a particular name or any references.... As for Showing and hiding divs they'll come in the second part of the problem i suppose when displaying content.... the problem of populating links specific to a subject of interest remains to be the biggest hurdle
It's just call DOM manipulation. I would suggest using jQuery. It's a very popular jQuery library tailors to working with the DOM.
Thanks for the help....I finally referred to a website that goes by htmldrive.net They had javascript codes for profiling links that did the trick

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.