Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

help to using an array checkbox in javascript

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Postby Redcircle » Thu Jul 03, 2003 7:34 am

s it the fact that Javascript desn't understand the [] at the end of the name's checkbox.
Javascript errors "object.length is null or not an object". Unfortunately I need the [] there
as they are to be processed by some php when I submit the form.


You are correct. Instead of using the actual object name you will need to use the element id.

document.element[id].checked

set the id numerically and it should work.
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA

Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot], Google Feedfetcher and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron