/    Sign up×
Community /Pin to ProfileBookmark

its works fine in IE but firefox its gives a "has no properties" error.

I have the following code ….its works fine in IE but firefox its gives a “has no properties” error.

document.getElementById(“vehiclesBean.vehicles[“+index+”].leaseDateMM”).value=”mm”;
document.getElementById(“vehiclesBean.vehicles[“+index+”].leaseDateYYYY”).value=”yyyy”;

Error:

document.getElementById(“vehiclesBean.vehicles[” + index + “].leaseDateMM”) has no properties
vehicles.js (line 185)
uncheckLeaseDatevehicles.js (line 185)
onclick

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@_Aerospace_Eng_Oct 18.2006 — What does your html look like? You do know you need to pass an ID NOT a name to the script since its using document.getElementById()?
Copy linkTweet thisAlerts:
@smartvishauthorOct 23.2006 — Yeah , I am passing the ID's
×

Success!

Help @smartvish 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.14,
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,
)...