/    Sign up×
Community /Pin to ProfileBookmark

*Newbie here, Table question

Hey guys,

I am a serious newbie. As in I need to create a site for our partners at work, and have never really coded using html and javascript. I hope you guys can help with my probably very simple question.

Here’s what I would like to do. I have three buttons at the top to look like tabs. I want to load a different paragraph (set of instructions) into the body based on what tab they clicked. So far, I have not been able to figure this out. I have a function that gets called when the user clicks on the button (via onclick in the image’s settings) ~ but I’m not quite sure how to make the body data change…I’ve tried everything.

Also, can someone direct me to an easier way to change the image button’s look when clicked besides changing the src of the image to another different colored image? This is also driving me crazy. Thanks!

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@ChikaraDec 13.2006 — Break the problem down into parts. First, try to get your buttons to change color.

Use the onclick feature to do the color changing. I don't have time to write up an example for you right now, but if you can wait 3 hours I will be happy to make one for you.
Copy linkTweet thisAlerts:
@alanniganauthorDec 13.2006 — Thanks, I think I can figure that one out...much easier than changing the src file.

What I'm really concerned with is how to change the body of the page based on which image "tab" the user presses. I think keeping it all on one page is the best option. Any ideas?
Copy linkTweet thisAlerts:
@ChikaraDec 13.2006 — This is a good way to approach the problem. View this site and read the ideas the author used.

http://host.sonspring.com/show-hide/
Copy linkTweet thisAlerts:
@alanniganauthorDec 13.2006 — Okay, thanks I will take a look. Also ~ if you don't mind posting your code on the color changing, that would be great. I'm a serious newbie ? Having trouble here.
×

Success!

Help @alannigan spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...