/    Sign up×
Community /Pin to ProfileBookmark

Hide form item using Javascript

Hi all,
I want to hide a form item when I mouseover one of my menus (because the menu is being placed behind the form item)…Does anyone have a good way of doing this? I don’t know javascript too well but if you know of any examples I could look at I could probably figure it out. Thanks!

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@cutpochauthorJan 16.2004 — thanks, I read through the article and it was very interesting ... I do have this code, does it look like something that could work? My form item is called "type" and I'm not sure how the syntax should be for the document.countryChooser.initCountry.style.visibility. I'm also a little confused about the case statements. I know the case statements are the different menus, there is a market menu, about menu, etc. My menus are setup a little different and I'm not exactly sure what they are called. You can see the menus here:

http://www.westminster.edu/about/contact_us.cfm

Thanks for your help!

function hideforms(obj){

if(document.all) {

switch (obj){

case "markets":

document.countryChooser.initCountry.style.visibility="hidden";

break;

case "about":

document.countryChooser.initCountry.style.visibility="hidden";

break;

case "community":

case "communityb":

case "careers":

case 'environment':

case 'investment':

case 'login2':

case 'country':

default:

document.countryChooser.initCountry.style.visibility="visible";

break;

}

} else if (document.layers) if(obj) document.layers['foo'].visibility='hidden'; else document.layers['foo'].visibility='visible';


}
×

Success!

Help @cutpoch 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.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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

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