Page 1 of 1

A Javascript error has been found on the page

Posted: Mon Jul 18, 2011 9:37 pm
by andrew_berry
Hi

Just noticed that since adding Tabber to my V9 site, I have the red box with Click to See Errors come up.

When I click on it it states A Javascript error has been found on the page ('jQuery' is undefined)' and A Javascript error has been found on the page ('Object Expected)'

This only happens after I add complete this addition:-

Go to Design / Library / Layouts / JavaScript Header Functions / Standard Javascript Header Functions.
Scroll down to the bottom and, after everything that's there, add the following:

<actinic:variable name="TabberSetup" />

The Tabber works fine here http://www.ziplob.co.uk/store/Nominatio ... elets.html (just a test site)

Can I just ignore it?

Also can I define the width of the overall width of the box with the Tabs in?

Re: A Javascript error has been found on the page

Posted: Tue Jul 19, 2011 7:59 am
by norman
Weird. The only time I'd expect that error would be if the Tabber Zipfile wasn't unzipped into your Site folder. All the files in the Zipfile should individually be in your Site folder (the place where ActinicCatalog.mdb lives). However Tabber wouldn't then work and you say it's working OK. Double check that all required files are there.

The overall width can be tweaked by going to Settings / Site Options / Layout / Tabbed Descriptions and noting what's set for Tabbed Descriptions Style. Now go to Design / Library / Layouts / Tabbed Descriptions / <Tabbed Descriptions Style>. For the "Rectangular" layouts look for the line:

Code: Select all

.widget { 
And immediately after this add something like:

Code: Select all

  width: 300px;
For the "Rounded" layouts, add a line at the top like:

Code: Select all

.widget {width: 300px;}
Changing the 300px to suit.

Re: A Javascript error has been found on the page

Posted: Tue Jul 19, 2011 5:32 pm
by andrew_berry
The thing is that the errors were flagged up by actinic before connection was made to the server, so Actinic obviously found a problem with the layout perhaps?

can I send you a screen shot perhaps?

the tabber works fine at http://www.ziplob.co.uk/store/Nominatio ... elets.html but its Actinic that shows the error.

Andrew

Re: A Javascript error has been found on the page

Posted: Tue Jul 19, 2011 5:47 pm
by norman
Try this:

Go to Design / Library / Layouts / TabbedDescriptions / Tabber Setup.

The first 7 lines should be:

Code: Select all

<script type="text/javascript">
	// V3.11
	if ( typeof(jQuery) == 'undefined' ) document.write('<script type="text/javascript" src="jquery-1.3.2.min.js"></sc' + 'ript>');
</script>
<script type="text/javascript">
	if ( typeof(jQuery.ui) == 'undefined' ) document.write('<script type="text/javascript" src="jquery-ui-1.8.10.custom.min.js"></sc' + 'ript>');
</script>
Replace them with (leave other lines intact):

Code: Select all

	<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
	<script type="text/javascript" src="jquery-ui-1.8.10.custom.min.js"></script>
And report if the error still occurs.

Re: A Javascript error has been found on the page

Posted: Tue Jul 19, 2011 7:34 pm
by andrew_berry
Hi Norman

That has corrected one of the errors, the error that is still there is 'A Javascript error has been found on the page ('Object Expected)'

Thanks for the quick replies, much appreciated.

Andrew

Re: A Javascript error has been found on the page

Posted: Tue Jul 19, 2011 10:46 pm
by norman
The error you are still seeing could be coming from something else. Try temporarily removing the two lines mentioned above. If the error persists, it's not from Tabber.

Re: A Javascript error has been found on the page

Posted: Wed Jul 20, 2011 5:27 pm
by andrew_berry
Yes, there are still errors when i remove those 2 lines.

BUT when I remove the <actinic:variable name="TabberSetup" /> from the Design / Library / Layouts / JavaScript Header Functions / Standard Javascript Header Functions there are then no errors.

Wierd?

Andrew

Re: A Javascript error has been found on the page

Posted: Wed Jul 20, 2011 6:10 pm
by norman
Try this. Go to Design . Library / Layouts / TabbedDescriptions / Tabber Setup.
There are two line that contain:

Code: Select all

$("div[id^='tabber_']:visible")
Put a space after the [ and another before the ] - e.g.

Code: Select all

$("div[ id^='tabber_' ]:visible")
leaving the rest of each line intact.

And do a simiar thing to the line

Code: Select all

echo $anims['<actinic:variable name="TabberAnimation" encoding="perl" selectable="false" />']
Changing it to

Code: Select all

echo $anims[ '<actinic:variable name="TabberAnimation" encoding="perl" selectable="false" />' ]

Re: A Javascript error has been found on the page

Posted: Wed Jul 20, 2011 7:00 pm
by andrew_berry
OK,

Done the editing but error still showing I'm afraid.

Andrew

Re: A Javascript error has been found on the page

Posted: Wed Jul 20, 2011 7:04 pm
by norman
Then I'm afraid the problem is unique to your system. No-one else is reporting this and I cannot recreate it here (tried with the exact Zipfile I sent you and my 9.0.5).

I'm presuming that you're only seeing this within the Design tab and that it's fine on the live site and normal Preview. If so I think you'll have to put it down as an Actinic quirk.

Re: A Javascript error has been found on the page

Posted: Wed Jul 20, 2011 9:37 pm
by andrew_berry
OK

Well, thanks for all your time and effort.

I do appreciate it.

Andrew