|
| Javascript problem - concatenation operator |
 |
Wed, 09 Aug 2006 16:20:59 -070 |
I'm trying desperately to make my script work in Opera. I have the
latest (9.1, just upgraded from 9.0 to see if it fixed this problem but
to no avail).
Opera fails with "script compilation error" several times throughout
my
entire script. It seems that whenever I try to concatenate two strings
with the "+" operator, Opera doesn't even see the operator! In the
error message, it shows my code with the plus character removed!
Example (this goes all in one line):
ieProp += iePropWords[i].substring(0, 1).toUpperCase() +
iePropWords[i].substring(1);
Fails with error message:
Syntax error while loading: line 13 of linked script blah blah
ords[i].substring(0, 1).toUpperCase() iePropWords[i].substr
--------------------------------------^
Any ideas what the problem could be? This error occurs over and over
throughout my script (which works fine in Gecko, KHTML, and IE). Each
time it shows my code sans plus sign and marks the spot where the plus
sign should be as the origin of the error.
Thanks,
|
| Post Reply
|
| Re: Javascript problem - concatenation operator |
 |
Thu, 10 Aug 2006 09:57:36 -070 |
Andrew Gregory wrote:
> On Thu, 10 Aug 2006 07:20:59 +0800, Jeremy <jeremy@pinacol.com>
wrote:
>
>> Opera fails with "script compilation error" several times
throughout
>> my entire script. It seems that whenever I try to concatenate two
>> strings with the "+" operator, Opera doesn't even see the
operator!
>> In the error message, it shows my code with the plus character
removed!
>
> We'd need to see a demo page. I've never seen that sort of problem before.
>
> --Andrew Gregory
> <URL: http://www.scss.com.au/family/andrew/ >
Okay. sample page at <http://www.designregime.org/~jeremy/foodark/> -
check out the error messages and compare them to the JS source files
(<http://www.designregime.org/~jeremy/foodark/scripts/constraintSlider.js>
for example, a double slider control) and verify for yourself that those
plus signs do, in fact, exist.
I'm really puzzled on this one - it's kind of frustrating because
there's no way I can really fix it without knowing what the problem
actually is. Thanks for any advice you can provide.
|
| Post Reply
|
| Re: Javascript problem - concatenation operator |
 |
Thu, 10 Aug 2006 10:19:31 -070 |
Andrew Gregory wrote:
> On Thu, 10 Aug 2006 07:20:59 +0800, Jeremy <jeremy@pinacol.com>
wrote:
>
>> Opera fails with "script compilation error" several times
throughout
>> my entire script. It seems that whenever I try to concatenate two
>> strings with the "+" operator, Opera doesn't even see the
operator!
>> In the error message, it shows my code with the plus character
removed!
>
> We'd need to see a demo page. I've never seen that sort of problem before.
>
> --Andrew Gregory
> <URL: http://www.scss.com.au/family/andrew/ >
Okay, this is where things get weird. Just for completeness, I tested
it on Opera 9.01 Mac. And it works like a charm.
I'll get a coworker to install it on their Windows machine. Maybe it's
just my computer? I should uninstall/reinstall I suppose.
It's comforting that it probably works for everyone else, though.
|
| Post Reply
|
| Re: Javascript problem - concatenation operator |
 |
Thu, 10 Aug 2006 10:27:09 -070 |
Jeremy wrote:
> Andrew Gregory wrote:
>> On Thu, 10 Aug 2006 07:20:59 +0800, Jeremy <jeremy@pinacol.com>
wrote:
>>
>>> Opera fails with "script compilation error" several times
throughout
>>> my entire script. It seems that whenever I try to concatenate two
>>> strings with the "+" operator, Opera doesn't even see the
operator!
>>> In the error message, it shows my code with the plus character
removed!
>>
>> We'd need to see a demo page. I've never seen that sort of problem
>> before.
>>
>> --Andrew Gregory
>> <URL: http://www.scss.com.au/family/andrew/ >
>
> Okay, this is where things get weird. Just for completeness, I tested
> it on Opera 9.01 Mac. And it works like a charm.
>
> I'll get a coworker to install it on their Windows machine. Maybe it's
> just my computer? I should uninstall/reinstall I suppose.
>
> It's comforting that it probably works for everyone else, though.
>
> Jeremy
Yep, works fine on my coworker's machine (well - almost fine. There are
still some graphical glitches that don't occur on any other platform,
and the "Learn More" pop-up bubbles do not function correctly).
In any case, I'm reinstalling opera now. I guess it was just my
machine. So this is no longer an issue for opera.page-authoring :P
Sorry if I wasted anyone's time.
|
| Post Reply
|
| Re: Javascript problem - concatenation operator |
 |
Thu, 10 Aug 2006 11:31:44 +080 |
On Thu, 10 Aug 2006 07:20:59 +0800, Jeremy <jeremy@pinacol.com> wrote:
> Opera fails with "script compilation error" several times
throughout my
> entire script. It seems that whenever I try to concatenate two strings
> with the "+" operator, Opera doesn't even see the operator! In
the
> error message, it shows my code with the plus character removed!
We'd need to see a demo page. I've never seen that sort of problem before.
--
Andrew Gregory
|
| Post Reply
|
|
|
|
|
|
|
|
|
|