/    Sign up×
Community /Pin to ProfileBookmark

show/div problem?

Hi ihave long time in problem with SHOW/hide content. I searched a lot and tried different methods to impplemet it but without any luck.

Hope here i can get any help.

Here is what i am trying to do?

I have one select box, and i select the value of the select box. the next select box gets popluated with the sub categories depended upon on the other.

Now i have 3 values in main select box: text, visual, upload

if i select text, a <input type=”text’> should be hidden and if i select visual or video a< input type=”text”> should be visible.

I am having a problem in this, Can plz someone guide me.

If possible through AJAX that will be much nicer.

Regards

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@wbportOct 23.2008 — The following link shows a working example:

Sudoku.htm

The following functions show how only one DIV is shown at a time:
[CODE]function showPage(sPage, bShow)
{
var div = document.getElementById(sPage);
div.style.visibility = bShow ? 'visible' : 'hidden';
div.style.position = bShow ? 'static' : 'absolute';
}
function setPage(sPage)
{
showPage('start', sPage == 'start');
showPage('details', sPage == 'details');
showPage('solver', sPage == 'solver');
showPage('about', sPage == 'about');
}[/CODE]

setPage() is called with the name of the DIV which is to be displayed, hiding everything else. HTH
×

Success!

Help @cfml2 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.17,
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,
)...