473,396 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

REQ:

Hi,

I have a little problem with the internet explorer 5.2 for mac. I have a
checkbox field which name is an array, but then I can't read the field on IE
for MAC. Other browsers don't seem to have problems with it, if I set the
id's of the field the same as the name is. Anybody has a solution?

Code:

<script>

function chklength(field) {

alert(field.length);

}

</script>

<form name="test">

<input type="checkbox" name="testfield[]" id="testfield" value=1> <input
type="checkbox" name="testfield[]" id="testfield" value=2> <input
type="button" onclick="chklength(this.form.testfield)"

</form>

Thanks in advance,

Ben

Jul 23 '05 #1
1 1427
solitaire wrote:
Hi,

I have a little problem with the internet explorer 5.2 for mac. I have a
checkbox field which name is an array, but then I can't read the field on IE
for MAC. Other browsers don't seem to have problems with it, if I set the
id's of the field the same as the name is. Anybody has a solution?

Code:

<script>

function chklength(field) {

alert(field.length);

}

</script>

<form name="test">

<input type="checkbox" name="testfield[]" id="testfield" value=1> <input
type="checkbox" name="testfield[]" id="testfield" value=2> <input
type="button" onclick="chklength(this.form.testfield)"

</form>


Read the FAQ, and it explains how to access a form element with PHP-like
names.
http://www.jibbering.com/faq/#FAQ4_39

document.forms['formName'].elements['testfield[]'].property;

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Dariusz | last post by:
I want to use arrays in my website (flat file for a guestbook), but despite having read through countless online tutorials on the topic, I just can't get my code to work. I know there are...
4
by: Dariusz | last post by:
I am a beginner in PHP and MySQL, and am working through a book and various online tutorials on PHP and MySQL and now stuck - installed everything on "localhost" and it all works fine. My question...
5
by: Dariusz | last post by:
I have PHP code (below) which reads data from a MySQL format database. The problem I am having is trying to find out when the last ID entry was made. When the script is executed, the $gbID is...
3
by: Keith Little | last post by:
Hi Gurus, I've been searching high and low for an script to use on my website which suits my needs but I haven't found anything. Since I've never used PHP I'm hoping the open-source community...
2
by: John F Dutcher | last post by:
Can anyone comment on why the code shown in the Python error is in some way incorrect...or is there a problem with Python on my hoster's site ?? The highlites don't seem to show here...but line...
7
by: dad | last post by:
REQ: any utilities for designing front-ends for databases
1
by: akkarthikeyan | last post by:
hi everyone, i am having a text file in the format account=somevalue username=program i want to parse the file and retrieve the result as per user req, suppose if user enter account it...
1
by: karanmymatrix | last post by:
Req Code For Horizontal Bar Attach To Image Thumbnail. With Every Change In Horizontal Bar ,it Scroll To New Image In Thumbnaiil !!! Plz Give Code For Same As Early As Possible!!!
0
by: ......ADMISSION IN TOP 10 IIT's and ENGINNERING CO | last post by:
Req. Designation - Jr. Software Engineer(QA) Company - Allindia Technologies Limited. Criteria - Any Degree SALARY - 2.5 to 3.5 lakhs PA. How to apply -:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.