/    Sign up×
Community /Pin to ProfileBookmark

My Javascript code for a Form wont work in IE?

I’ve done a form where there are hidden fields which are displayed using javascript and css. Now it works fine in FF however in IE the javascript code doesn’t execute. Any reason why?

[URL=http://demo3.rocketss.com/private-client/costs/index.php]The Problem[/URL]

The buy and sell chekboxes execute the javascript code using onClick()

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@BrainEaterMar 02.2006 — IE has poor CSS support -- it doesn't understand display='table-cell'

Easy to fix though, just have your onclick switch between display='none' and display='', since setting display='' allows the browser to use the default display style.
Copy linkTweet thisAlerts:
@martinsandhuauthorMar 02.2006 — and display='', since setting display='[/QUOTE]

What do you mean here sorry i couldn't understand what you meant.

thanks for looking
Copy linkTweet thisAlerts:
@BrainEaterMar 02.2006 — Your current onclick:if(this.checked){
document.getElementById('buying').style.display='table-cell';
} else {
document.getElementById('buying').style.display='none';
}
return true;
One that will work:if(this.checked){
document.getElementById('buying').style.display='';
} else {
document.getElementById('buying').style.display='none';
}
return true;
×

Success!

Help @martinsandhu 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 6.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: @nearjob,
tipped: article
amount: 1000 SATS,

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

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