A Javascript error has been found on the page

Tabbed Product and Fragment Descriptions.
Post Reply
andrew_berry
Posts: 7
Joined: Thu Jul 14, 2011 3:49 pm

A Javascript error has been found on the page

Post 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?
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: A Javascript error has been found on the page

Post 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.
Norman
andrew_berry
Posts: 7
Joined: Thu Jul 14, 2011 3:49 pm

Re: A Javascript error has been found on the page

Post 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
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: A Javascript error has been found on the page

Post 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.
Norman
andrew_berry
Posts: 7
Joined: Thu Jul 14, 2011 3:49 pm

Re: A Javascript error has been found on the page

Post 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
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: A Javascript error has been found on the page

Post 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.
Norman
andrew_berry
Posts: 7
Joined: Thu Jul 14, 2011 3:49 pm

Re: A Javascript error has been found on the page

Post 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
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: A Javascript error has been found on the page

Post 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" />' ]
Norman
andrew_berry
Posts: 7
Joined: Thu Jul 14, 2011 3:49 pm

Re: A Javascript error has been found on the page

Post by andrew_berry »

OK,

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

Andrew
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: A Javascript error has been found on the page

Post 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.
Norman
andrew_berry
Posts: 7
Joined: Thu Jul 14, 2011 3:49 pm

Re: A Javascript error has been found on the page

Post by andrew_berry »

OK

Well, thanks for all your time and effort.

I do appreciate it.

Andrew
Post Reply