Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #16054
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2012-09-20 10:51 -0700 |
| Message-ID | <5f8cd44c-a554-42b4-bde5-5e099bdce516@googlegroups.com> (permalink) |
| Subject | referencing variable name for object in an array, receiving TypeError when using to set property of object |
| From | Quaye Trimble <qtrimble@gmail.com> |
This would probably be better described if I give you the link so you can follow along. https://bccmws.coastal.edu/buoydata/buoyobs1.html The function initChart contains a single argument which defines the time period of data to display . The function gets the data and configures some of the chart options. Most of the chart options are already defined in a separate js file. OK, so within this function, I’m referencing a global object called dataArr which stores some configuration information for querying the data and defining some additional chart options. You can see how I’m constructing the object on line 185 if you are using Firebug or something similar. If data is returned I’m calling the function setChart and passing a bunch of arguments into it. The first argument contains the variable name of one of the external chart options object. Using the Firebug console, the output is correct but I’m getting a TypeError. It’s as if the variable output isn’t being used to define the chart option variable name but it’s like it wants the variable name to be a completely different object. I’m not trained in JavaScript (or any programming language for that matter) so I’m probably doing something that isn’t allowed. Let me know if I need to clarify anything and thanks for your willingness to help me. Quaye
Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread
referencing variable name for object in an array, receiving TypeError when using to set property of object Quaye Trimble <qtrimble@gmail.com> - 2012-09-20 10:51 -0700
Re: referencing variable name for object in an array, receiving TypeError when using to set property of object JJ <jaejunks_at@_googlemail_dot._com> - 2012-09-20 22:56 +0000
Re: referencing variable name for object in an array, receiving TypeError when using to set property of object Quaye Trimble <qtrimble@gmail.com> - 2012-10-10 05:28 -0700
csiph-web