/    Sign up×
Community /Pin to ProfileBookmark

Object doesn’t support this property or method

I am making a form and I am getting this error when I push the reset button or the save button “Object doesn’t support this property or method: ‘resetall'”
My reset button says this..

[CODE]<input type=”button” name=”resetall” onclick=”resetall()” value=”Reset All”>[/CODE]

and the reset function is this..

[CODE]function resetall()
{
uid.value=””
ban.value=””
casesban.value=””
casesissue.value=””
calltype.value=”selecttype”
issue.value=”selectissue”
subissue.value=”selectsub”
brief.value=””
ctv.value=”selectsub”
resolution.value=”selectresolution”
}[/CODE]

I tried to google it and it is saying something about the form doesn’t support it but I have another hta file that I use the same code on and it works fine.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@Sterling_IsfineMay 18.2009 — The form elements being addressed are out of scope. Assuming that uid, ban etc are element names not IDs, try it like this:
[CODE]<input type="button" name="resetall" onclick="resetall( [COLOR="Red"]this.form[/COLOR] )" value="Reset All">[/CODE]

[CODE]function resetall( theForm )
{
with( theForm )
{
uid.value=""
ban.value=""
casesban.value=""
casesissue.value=""
calltype.value="selecttype"
issue.value="selectissue"
subissue.value="selectsub"
brief.value=""
ctv.value="selectsub"
resolution.value="selectresolution"
}
}
[/CODE]
Copy linkTweet thisAlerts:
@dumbestcrayonauthorMay 18.2009 — I figured it out.

I deleted the line
[CODE]<form id=form1 action="post">[/CODE]
and changed the name of the buttons from submit to submit1 and from save to saveandreset.


Thanks for the help
×

Success!

Help @dumbestcrayon 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.19,
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,
)...