By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,695 Members | 1,638 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,695 IT Pros & Developers. It's quick & easy.

representing [ and ] characters in function

P: n/a
Hi, very quickly I have checkbox to call function

<INPUT TYPE = "checkbox" NAME = "AttributeValue[1]" VALUE = "Yes"
OnClick="javascript:Showaddendum(this.form);">
The function itself has this:

if (form.AttributeValue[1].checked) {

(more script)

}
That doesn't work because I believe it is interpreting the [ ] characters
as representing array (I think).

How is syntax for AttributeValue[1] as literal value in function?

Does this make sense? Thanks.
Oct 17 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
John wrote:
How is syntax for AttributeValue[1] as literal value in function?
I wanted to refer you to http://jibbering.com/faq, which lists the answer,
but since the site appears to be unreachable, here's the answer.

Use the following syntax:

form.elements['AttributeValue[1]'].checked
JW
Oct 17 '07 #2

P: n/a
Janwillem Borleffs said the following on 10/17/2007 4:42 PM:
John wrote:
>How is syntax for AttributeValue[1] as literal value in function?

I wanted to refer you to http://jibbering.com/faq, which lists the answer,
but since the site appears to be unreachable,
I noticed that about an hour or so ago. I emailed Jim about it and
hopefully it will be back up soon.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Oct 17 '07 #3

P: n/a
Randy Webb said the following on 10/17/2007 5:39 PM:
Janwillem Borleffs said the following on 10/17/2007 4:42 PM:
>John wrote:
>>How is syntax for AttributeValue[1] as literal value in function?

I wanted to refer you to http://jibbering.com/faq, which lists the
answer, but since the site appears to be unreachable,

I noticed that about an hour or so ago. I emailed Jim about it and
hopefully it will be back up soon.
That figures.
Check it - it is down.
Post to Usenet.
Check it - it is up.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Oct 17 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.