<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Javascript Gotcha: Invalid Assignment Left-Hand Side</title>
	<atom:link href="http://www.u-g-h.com/2008/08/18/javascript-gotcha-invalid-assignment-left-hand-side/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.u-g-h.com/2008/08/18/javascript-gotcha-invalid-assignment-left-hand-side/</link>
	<description>Distracting the Mind with Information Overload</description>
	<lastBuildDate>Sat, 24 Jul 2010 12:57:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: droope</title>
		<link>http://www.u-g-h.com/2008/08/18/javascript-gotcha-invalid-assignment-left-hand-side/comment-page-1/#comment-77445</link>
		<dc:creator>droope</dc:creator>
		<pubDate>Wed, 28 Apr 2010 16:46:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.u-g-h.com/?p=2333#comment-77445</guid>
		<description>Gotta love javascript error reporting.</description>
		<content:encoded><![CDATA[<p>Gotta love javascript error reporting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Pugh</title>
		<link>http://www.u-g-h.com/2008/08/18/javascript-gotcha-invalid-assignment-left-hand-side/comment-page-1/#comment-77345</link>
		<dc:creator>Eric Pugh</dc:creator>
		<pubDate>Wed, 21 Apr 2010 17:15:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.u-g-h.com/?p=2333#comment-77345</guid>
		<description>I had a bit of ruby code generating a variable in JS that was failing:

  check_var__ = false;

I had spaces in core.solr.name, so I swapped to using dashes.   And then had more errors, thank you for this post, it highlighted my problem!</description>
		<content:encoded><![CDATA[<p>I had a bit of ruby code generating a variable in JS that was failing:</p>
<p>  check_var__ = false;</p>
<p>I had spaces in core.solr.name, so I swapped to using dashes.   And then had more errors, thank you for this post, it highlighted my problem!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: magicrebirth</title>
		<link>http://www.u-g-h.com/2008/08/18/javascript-gotcha-invalid-assignment-left-hand-side/comment-page-1/#comment-76055</link>
		<dc:creator>magicrebirth</dc:creator>
		<pubDate>Wed, 30 Sep 2009 16:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.u-g-h.com/?p=2333#comment-76055</guid>
		<description>thanks man that saved me tons of time (and coffees!)</description>
		<content:encoded><![CDATA[<p>thanks man that saved me tons of time (and coffees!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: josh</title>
		<link>http://www.u-g-h.com/2008/08/18/javascript-gotcha-invalid-assignment-left-hand-side/comment-page-1/#comment-75740</link>
		<dc:creator>josh</dc:creator>
		<pubDate>Thu, 20 Aug 2009 16:52:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.u-g-h.com/?p=2333#comment-75740</guid>
		<description>It was actually a case of blah.style.background-color=&#039;blah&#039;; for me. if i did background_color, the rest of the js ran ok, but i had to use backgroundColor to actually set and access the element&#039;s color.</description>
		<content:encoded><![CDATA[<p>It was actually a case of blah.style.background-color=&#8217;blah&#8217;; for me. if i did background_color, the rest of the js ran ok, but i had to use backgroundColor to actually set and access the element&#8217;s color.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zachary</title>
		<link>http://www.u-g-h.com/2008/08/18/javascript-gotcha-invalid-assignment-left-hand-side/comment-page-1/#comment-75126</link>
		<dc:creator>Zachary</dc:creator>
		<pubDate>Sat, 20 Jun 2009 22:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.u-g-h.com/?p=2333#comment-75126</guid>
		<description>Thank you so much!  I have spent a couple of days trying to figure out what was wrong with a function I created and out of frustration turned to Google and found this page after a lot of searching.  This fixed many of the problems I was having.  Thanks again!</description>
		<content:encoded><![CDATA[<p>Thank you so much!  I have spent a couple of days trying to figure out what was wrong with a function I created and out of frustration turned to Google and found this page after a lot of searching.  This fixed many of the problems I was having.  Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Art</title>
		<link>http://www.u-g-h.com/2008/08/18/javascript-gotcha-invalid-assignment-left-hand-side/comment-page-1/#comment-71976</link>
		<dc:creator>Art</dc:creator>
		<pubDate>Thu, 11 Dec 2008 16:51:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.u-g-h.com/?p=2333#comment-71976</guid>
		<description>Did you know that this post comes up #2 in Google for the term &quot;invalid assignment left-hand side&quot;?

Well it does, and I&#039;m really glad because you just saved me some serious time trying to research the error.

Kudos!</description>
		<content:encoded><![CDATA[<p>Did you know that this post comes up #2 in Google for the term &#8220;invalid assignment left-hand side&#8221;?</p>
<p>Well it does, and I&#8217;m really glad because you just saved me some serious time trying to research the error.</p>
<p>Kudos!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Thompson</title>
		<link>http://www.u-g-h.com/2008/08/18/javascript-gotcha-invalid-assignment-left-hand-side/comment-page-1/#comment-71463</link>
		<dc:creator>Jesse Thompson</dc:creator>
		<pubDate>Sat, 15 Nov 2008 01:38:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.u-g-h.com/?p=2333#comment-71463</guid>
		<description>That&#039;s not so inexplicable, &quot;-&quot; just isn&#039;t a valid character for identifiers in javascript. It&#039;s reserved for uses like the minus sign.

Seriously, how else will Javascript know what you want when you talk about:

this.a-that.b

Are we accessing property b within propterty &quot;a-that&quot;, or are we subtracting this.b from this.a? So, the minus sign just can&#039;t be used in bare identifiers.

It&#039;s true that you can use form names that contain characters that don&#039;t make valid JS identifiers, and in that case the bracket syntax saves the day.

As to why using a _ worked instead, there might be a provision in there somewhere which aliases abc-def and abc_def to mean the same thing. I for one would not count on such a provision however, as [] syntax clarifies your intentions unambiguously.

Mangia. :D

- - Jesse</description>
		<content:encoded><![CDATA[<p>That&#8217;s not so inexplicable, &#8220;-&#8221; just isn&#8217;t a valid character for identifiers in javascript. It&#8217;s reserved for uses like the minus sign.</p>
<p>Seriously, how else will Javascript know what you want when you talk about:</p>
<p>this.a-that.b</p>
<p>Are we accessing property b within propterty &#8220;a-that&#8221;, or are we subtracting this.b from this.a? So, the minus sign just can&#8217;t be used in bare identifiers.</p>
<p>It&#8217;s true that you can use form names that contain characters that don&#8217;t make valid JS identifiers, and in that case the bracket syntax saves the day.</p>
<p>As to why using a _ worked instead, there might be a provision in there somewhere which aliases abc-def and abc_def to mean the same thing. I for one would not count on such a provision however, as [] syntax clarifies your intentions unambiguously.</p>
<p>Mangia. <img src='http://www.u-g-h.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>- &#8211; Jesse</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Owen</title>
		<link>http://www.u-g-h.com/2008/08/18/javascript-gotcha-invalid-assignment-left-hand-side/comment-page-1/#comment-69501</link>
		<dc:creator>Owen</dc:creator>
		<pubDate>Tue, 19 Aug 2008 13:11:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.u-g-h.com/?p=2333#comment-69501</guid>
		<description>@Mike: Thanks for your comment. Yeah. That would have worked too. Just took me ages to figure out what the problem was!</description>
		<content:encoded><![CDATA[<p>@Mike: Thanks for your comment. Yeah. That would have worked too. Just took me ages to figure out what the problem was!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Cromwell</title>
		<link>http://www.u-g-h.com/2008/08/18/javascript-gotcha-invalid-assignment-left-hand-side/comment-page-1/#comment-69496</link>
		<dc:creator>Mike Cromwell</dc:creator>
		<pubDate>Mon, 18 Aug 2008 19:18:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.u-g-h.com/?p=2333#comment-69496</guid>
		<description>I remember having a similar problem, I solved it by using the elements array of the Form object instead, so your example code would become:

opener.document.forms[0].elements[&#039;plugin-media4pic&#039;].value = “avatar.jpg”;

hope this helps :)</description>
		<content:encoded><![CDATA[<p>I remember having a similar problem, I solved it by using the elements array of the Form object instead, so your example code would become:</p>
<p>opener.document.forms[0].elements['plugin-media4pic'].value = “avatar.jpg”;</p>
<p>hope this helps <img src='http://www.u-g-h.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
