/    Sign up×
Community /Pin to ProfileBookmark

Can Somebody Spot where this "I Like These" Script is Failing?

I have the script working on a desktop test, but when I transfer it to the target site, [url]http://www.borderstogo.com/murals.html[/url]

it doesn’t work online. The idea is to take a Category Page on a web store and put a checkbox beside each item illustrated on the page. Clicking the “I Like This” checkbox should cause a copy of the selected item to show up in the “I Like These” area near the top of the right column. The idea is that on a large category page, particularly one that is paginated, the shopper can collect the two or three or four items they like best, easily compare them, then select their favorite for purchase. But for some reason, the scripting isn’t working online. I have verified that the scripts are the same as the working copy running on my desktop.

Scripts involved are:
<script src=”http://lib.store.yahoo.net/lib/yhst-68986320726817/etRecentItems.js”></script>
<script src=”http://lib.store.yahoo.net/lib/yhst-68986320726817/et-ilikethese.js”></script>

There is a Onload in the <BODY tag to launch the scripting. It is correct. There is also a brief script in the right column serving as an anchor for the HTML the scripting will write. That all appears to match my destopt copy that works.

What am I missing?

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@BIOSTALLJul 03.2010 — There is a function in Yahoo's et-ilikethese.js called 'initLoad()' that is called on page load and is looking for an element on your page with an ID of 'right_column'. There is no element with this ID however, hence the error.

Let me know if you would like me to explain further of if this is not the case.

All the best
Copy linkTweet thisAlerts:
@ETproauthorJul 03.2010 — DOH! I knew it I was staring right at it. Thanks so much!
Copy linkTweet thisAlerts:
@ETproauthorJul 03.2010 — Drat. That apparently isn;t the only fly in the ointment. I added the missing ID and still no go.
Copy linkTweet thisAlerts:
@Sterling_IsfineJul 03.2010 — Drat. That apparently isn;t the only fly in the ointment. I added the missing ID and still no go.[/QUOTE]

That error is still there on the live site and there are other errors indicated in the error console.

There seem to be many markup errors which should be fixed first. The main problem looks like the wrong doctype in use; this isn't xhtml.

I would suggest HTML 4.01 strict

[CODE]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">[/CODE]


Then validate the markup somewhere like http://validator.aborla.net/

The W3C validator doesn't seem to be operating currently.
Copy linkTweet thisAlerts:
@ETproauthorJul 04.2010 — It is a Yahoo! Store. Most of the errors are outside my control, as is the DTD. Yahoo has refused to fix the errors. THey say they verified that they produce no problems in any major browser, and that they were assured by Google engineers that they don't intefere with SEO. Such is life.

What are you using as a console to check for JS errors?
×

Success!

Help @ETpro spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...