syntax error when placing gloabl options: invalid label

Page: 1

Author Post
Member
Registered: Sep 2011
Posts: 17
Hi Byron,

after a long time I am getting back into working with your awesome piece of software again :) and I am having a bit trouble :? .

The following works for me:

<script type="text/javascript">	
fbPageOptions = {
licenseKey: "",
showIE6EndOfLife: true,
...
};
</script>


but this here throws an error in the Firefox JS console:

<script type="text/javascript">	
globalOptions: {
licenseKey: "",
showIE6EndOfLife: true,
...
};
</script>


Quote
Error: SyntaxError: invalid label
Source code:
showIE6EndOfLife: true,


Any idea what the problem is?

Warm regards from Bali,
Sebastian
Administrator
Registered: Aug 2008
Posts: 3382
Hi Sebastian,

The second snippet throws an error simply because it is not valid javascript. It would be valid if you used an '=' instead of a ':'.

What is it you are trying to do there? If you want to modify globalOptions site wide, edit the options.js file (or use the configurator). If you want to set options effective for the current page, place them in your fbPageOptions definition. (The configurator can be used for page options as well.)
Member
Registered: Sep 2011
Posts: 17
I am sorry,
I did not read the line of text in the Configurator which says:
Replace globalOptions in floatbox/options.js with the following code.

I try to place that in the body-tag and so that's why it is not valid js. :)

I am trying to setup the global options and than I will work with dynamic page options later (through Wordpress templates). That worked always well so far.

Thanks for helping me thinking. :)

Seb

Page: 1