/    Sign up×
Community /Pin to ProfileBookmark

obj has no properties

When I hit Submit on my form page I get this JavaScript error

[code=php]obj has no properties[/code]

The function my webdeveloper extension in Firefox points to is this:

[code=php]function checkRadio( obj )
{
for ( var i = 0; i < obj.length; i++ )
{
if ( obj[i].checked )
{
return true;
}
}
return false;
}[/code]

This function is called by:

[code=php]function validateRadio( obj )
{
var bChecked = checkRadio( obj );

for ( var i = 0; i < obj.length; i++ )
{
toggleError( obj[i], !bChecked );
}

return ( bChecked !== false );
}[/code]

Can someone help me out?

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@KravvitzOct 25.2006 — We will need to see the call to validateRadio() and know what the argument being passed to it is exactly.
Copy linkTweet thisAlerts:
@konithomimoOct 25.2006 — We will need to see the call to validateRadio() and know what the argument being passed to it is exactly.[/QUOTE]

I agree. what is being passed to validateRadio()? Is it an array of objects? If it isnt then that could be a problem.
Copy linkTweet thisAlerts:
@PadonakOct 25.2006 — sometimes such errors are caused by attempts to operate with objects which havent been already appended as a childNode to the document or its node. for example if you create a new element (let it be a div) you cant get its offsetWidth or offsetHeight until it is appended to the doc.

sorry for disgusting english
Copy linkTweet thisAlerts:
@MrD3SAiauthorOct 25.2006 — Fixed... There was a call for validateRadio function which wasn't suppose to be there.
×

Success!

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