473,320 Members | 1,838 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,320 software developers and data experts.

representing [ and ] characters in function

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
3 1125
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andrew McLean | last post by:
Looking at PEP218 there is a discussion about the most appropriate way of representing the empty set. The two alternatives proposed are {} and {-}. I was wondering why either of these is needed....
6
by: Melkor Ainur | last post by:
Hello, I'm attempting to build an interpreter for a pascal-like language. Currently, I don't generate any assembly. Instead, I just build an abstract syntax tree representing what I've parsed...
35
by: David Mathog | last post by:
Every so often one of my fgets() based programs encounters an input file containing embedded nulls. fgets is happy to read these but the embedded nulls subsequently cause problems elsewhere in...
5
by: Sakharam Phapale | last post by:
Hi All, I am using an API function, which takes file path as an input. When file path contains special characters (@,#,$,%,&,^, etc), API function gives an error as "Unable to open input file"....
9
by: Dr. Colombes | last post by:
I'm looking for a good Python way to generate (enumerate) the 2**N tuples representing all vertices of the unit hypercube in N-dimensional hyperspace. For example, for N=4 the Python code should...
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
11
by: Ron L | last post by:
I have a barcode scanner which uses a "keyboard wedge" program so that the data it scans comes through as if it was typed on a keyboard. I am trying to have the data in the barcode be displayed in...
19
by: nickyeng | last post by:
i have a question from my paper, which i dont have the correct answer, so here i asking anyone who can help, provide me the appropriate answer. ----------------------------------- Write a class...
6
by: penny | last post by:
In this assignment we shall look at a possible representation of rational numbers in java using objects. The java language represents rational numbers using the same representation used for other...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.