/    Sign up×
Community /Pin to ProfileBookmark

Recovering hidden space

Background:
three divs consisting of:
first div has text label i.e. Item Code .. Reference One …..
second div has <select> element
third div has <input type=”text”> element

15 of these combinations are initially displayed.
User action causes javascript to set visibility to hidden on some of the combinations. i.e. the first, fifth and tenth combinations are set to visibility: hidden;

This works but the space occupied by those combinations is still evident in the resulting page.

Looking for a way to cause the page to re-load, re-display or any other action that I can use to cause the hidden space to collapse.

TIA
Frank

to post a comment
CSS

6 Comments(s)

Copy linkTweet thisAlerts:
@TheBearMayOct 19.2004 — Try using:

display:none

instead of visibility.
Copy linkTweet thisAlerts:
@few1938authorOct 19.2004 — No Joy! I have tried display:none; and visibility:hidden with no success.

Here is a sample of the javascript:

if (typecaps[i][0] != 0 '+CHR(38)+''+CHR(38)+' typecaps[i][30] & 1 == 1) {

document.getElementById("ref1").innerHTML = typecaps[i][1];

document.getElementById("ref1ddlb").style.visibility="visible";

document.getElementById("ref1Text").style.visibility="visible";

} else {

document.getElementById("ref1").innerHTML = "";

document.getElementById("ref1ddlb").style.display="none";

document.getElementById("ref1Text").style.display="none";

}



This is repeated for the other fourteen combinations.



The code works, but the hidden space is not collapsed.
Copy linkTweet thisAlerts:
@TheBearMayOct 19.2004 — Try this instead:

[code=php]
if (typecaps[i][0] != 0 '+CHR(38)+''+CHR(38)+' typecaps[i][30] & 1 == 1) {
document.getElementById("ref1").innerHTML = typecaps[i][1];
document.getElementById("ref1ddlb").style.display="block";
document.getElementById("ref1Text").style.display="block";
} else {
document.getElementById("ref1").innerHTML = "";
document.getElementById("ref1ddlb").style.display="none";
document.getElementById("ref1Text").style.display="none";
}[/code]
Copy linkTweet thisAlerts:
@few1938authorOct 19.2004 — Still no Joy!

I have been looking for a way to cause the browser to refresh the page thinking that could cause the collaspe. Any thoughts on this???


BTW

Thanks for the quick replies.

TIA

Frank
Copy linkTweet thisAlerts:
@TheBearMayOct 19.2004 — Should work if the divs have the IDs listed. Hmmm...?
Copy linkTweet thisAlerts:
@TheBearMayOct 19.2004 — A thought...do you have any styles assigned to these divs through a linked sheet or up in the head. Sometimes that will cause problems...
×

Success!

Help @few1938 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 4.20,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...