Could this: delay(delayValue); have anything to do with it? In your code, if you comment out all the calls to CreateOnClickEvent, does it make the page respond? I think just by drilling in and testing like this, you'll be likely to find the cause of the unresponsive script issues.
On Jun 19, 11:05 am, bombaru <bomb...@gmail.com> wrote: > That's part of Omniture tracking code. Looks like this: > > function CreateOnClickEvent(sTitle, nEvarNumber, sValue) { > try { > var s2 = s_gi(s_account); > if (SetS2EvarValue(s2, nEvarNumber, sValue)) > { > s2.linkTrackVars = 'eVar' + nEvarNumber; > s2.linkTrackEvents = sTitle; > s2.events = sTitle; > s2.tl(sTitle, 'o', sTitle); > > } > } > catch (err) { } > { > } > delay(delayValue); // need the delay so we can get this data to > Omniture before the next data for the page draw. > > } > > On Jun 19, 2:29 pm, James <james.gp....@gmail.com> wrote: > > > What does the function for "CreateOnClickEvent" look like if you don't > > mind posting that? > > > On Jun 19, 6:15 am, bombaru <bomb...@gmail.com> wrote: > > > > Same result: Unresponsive script error > > > > On Jun 19, 11:17 am, amuhlou <amysch...@gmail.com> wrote: > > > > > what happens if you put an empty else {} after the last elseif? > > > > > On Jun 19, 10:33 am, bombaru <bomb...@gmail.com> wrote: > > > > > > I think it's the "if/else if" statement at the top. If I change the > > > > > last "else if" to just an "else", I get a syntax error but no > > > > > unresponsive script error. > > > > > > function mousedownSearchTracking(e) { > > > > > var $zone = $(this); > > > > > > if (typeof (e.data.action) == "undefined") { > > > > > if (typeof (CreateOnClickEvent) != "undefined") > > > > > CreateOnClickEvent('Search', 30, searchHandler + > > > > > e.data.section); // just section data > > > > > } > > > > > else if (e.data.action == "link") { > > > > > var linkText = $zone.text(); > > > > > if (typeof (CreateOnClickEvent) != "undefined") > > > > > CreateOnClickEvent('Search', 30, searchHandler + > > > > > e.data.section + ':' + linkText); // with link data > > > > > } > > > > > else if (e.data.action == "position") { > > > > > var position = $zone.attr('position'); > > > > > if (typeof (CreateOnClickEvent) != "undefined") > > > > > CreateOnClickEvent('Search', 30, searchHandler + > > > > > e.data.section + ':' + position); // add position data > > > > > } > > > > > > $zone.unbind('mousedown'); > > > > > > } > > > > > > On Jun 19, 10:17 am, bombaru <bomb...@gmail.com> wrote: > > > > > > > I've pinpointed the script that's causing the timeout. Commenting > > > > > > this script out resolves the issue. I don't see anything in this > > > > > > script however that is out of place. I'd be curious if some better > > > > > > trained eyes find something. > > > > > > > Thanks again for all of your help. > > > > > > > ======================================// > > > > > > > jQuery(document).ready(function($) { > > > > > > > var searchHandler = 'MoneySearch'; > > > > > > > function mousedownSearchTracking(e) { > > > > > > var $zone = $(this); > > > > > > > if (typeof (e.data.action) == "undefined") { > > > > > > if (typeof (CreateOnClickEvent) != "undefined") > > > > > > CreateOnClickEvent('Search', 30, searchHandler + > > > > > > e.data.section) // just section data > > > > > > } > > > > > > else if (e.data.action == "link") { > > > > > > var linkText = $zone.text(); > > > > > > if (typeof (CreateOnClickEvent) != "undefined") > > > > > > CreateOnClickEvent('Search', 30, searchHandler + > > > > > > e.data.section + ':' + linkText) // with link data > > > > > > } > > > > > > else if (e.data.action == "position") { > > > > > > var position = $zone.attr('position'); > > > > > > if (typeof (CreateOnClickEvent) != "undefined") > > > > > > CreateOnClickEvent('Search', 30, searchHandler + > > > > > > e.data.section + ':' + position) // add position data > > > > > > } > > > > > > > $zone.unbind('mousedown'); > > > > > > > } > > > > > > > /// Handle the Search box submit on the Search page > > > > > > function submitSearchTracking(e) { > > > > > > var $zone = $(this); > > > > > > var inputValue = $('input[id=prod-search]').val(); // get > > > > > > the > > > > > > search value the user typed in > > > > > > > if (typeof (CreateOnClickEvent) != "undefined") > > > > > > CreateOnClickEvent('Search', 30, searchHandler + > > > > > > e.data.section) // just section data > > > > > > > $zone.unbind('submit'); > > > > > > } > > > > > > > // Click Events to bind > > > > > > // ----------------------------------------------- > > > > > > // re-search > > > > > > $('form[id=searchform]').bind('submit', { section: ":re-search" > > > > > > }, > > > > > > submitSearchTracking); > > > > > > > // Did You Mean > > > > > > $('div.did-you-mean a').bind('mousedown', { section: > > > > > > ":DidYouMean" }, mousedownSearchTracking); > > > > > > > // Category filters > > > > > > $("li[trackcat='Category'] ul li").not($("li.toggle")).each > > > > > > (function(counter) { > > > > > > var thiscounter = counter + 1; > > > > > > $("li[trackcat='Category'] ul li:nth-child(" + thiscounter + > > > > > > ") a").bind('mousedown', { section: ":Category" + thiscounter }, > > > > > > mousedownSearchTracking); > > > > > > }); > > > > > > > // Brand filters > > > > > > $("li[trackcat='Brand'] ul > > > > > > li").not($("li.toggle")).each(function > > > > > > (counter) { > > > > > > var thiscounter = counter + 1; > > > > > > $("li[trackcat='Brand'] ul li:nth-child(" + thiscounter + ") > > > > > > a").bind('mousedown', { section: ":Brand" + thiscounter }, > > > > > > mousedownSearchTracking); > > > > > > }); > > > > > > > // Price range filters > > > > > > $("li[trackcat='Price Range'] ul li a").each(function(counter) { > > > > > > $(this).bind('mousedown', { section: ":PriceRange" }, > > > > > > mousedownSearchTracking); > > > > > > }); > > > > > > > // Customer rating filters > > > > > > $("li[trackcat='Customer Rating'] ul li > > > > > > a").each(function(counter) > > > > > > { > > > > > > searchHandler = 'MoneySearchB'; > > > > > > > var inputValue = $(this).text(); > > > > > > if (inputValue.search("5 stars") > -1) > > > > > > $(this).bind('mousedown', { section: > > > > > > ":CustomerRating5Stars" }, mousedownSearchTracking); > > > > > > else if (inputValue.search("4 stars") > -1) > > > > > > $(this).bind('mousedown', { section: > > > > > > ":CustomerRating4Stars" }, mousedownSearchTracking); > > > > > > else if (inputValue.search("3 stars") > -1) > > > > > > $(this).bind('mousedown', { section: > > > > > > ":CustomerRating3Stars" }, mousedownSearchTracking); > > > > > > else if (inputValue.search("2 stars") > -1) > > > > > > $(this).bind('mousedown', { section: > > > > > > ":CustomerRating2Stars" }, mousedownSearchTracking); > > > > > > else if (inputValue.search("1 star") > -1) > > > > > > $(this).bind('mousedown', { section: > > > > > > ":CustomerRating1Star" }, mousedownSearchTracking); > > > > > > else if (inputValue.search("Not Yet Rated") > -1) > > > > > > $(this).bind('mousedown', { section: > > > > > > ":CustomerRatingNotYetRated" }, mousedownSearchTracking); > > > > > > }); > > > > > > > // The 'more' buttons to expand long filters > > > > > > $("li[trackcat='Category'] li.toggle a").bind('mousedown', > > > > > > { section: ":CategoryMore" }, mousedownSearchTracking); > > > > > > $("li[trackcat='Brand'] li.toggle a").bind('mousedown', { > > > > > > section: > > > > > > ":BrandMore" }, mousedownSearchTracking); > > > > > > > // Learn tab content > > > > > > $("ul[trackcat='learntabcontent'] li").each(function(counter) { > > > > > > var thiscounter = counter + 1; > > > > > > $("ul[trackcat='learntabcontent'] li:nth-child(" + > > > > > > thiscounter > > > > > > + ") a").bind('mousedown', { section: ":Article" + thiscounter }, > > > > > > mousedownSearchTracking); > > > > > > }); > > > > > > > // Support content > > > > > > $("ul[trackcat='supportcontent'] li").each(function(counter) { > > > > > > var thiscounter = counter + 1; > > > > > > $("ul[trackcat='supportcontent'] li:nth-child(" + > > > > > > thiscounter > > > > > > + ") a").bind('mousedown', { section: ":Support" + thiscounter }, > > > > > > mousedownSearchTracking); > > > > > > }); > > > > > > > // Community content > > > > > > $("ul[trackcat='communitycontent'] li").each(function(counter) { > > > > > > var thiscounter = counter + 1; > > > > > > $("ul[trackcat='communitycontent'] li:nth-child(" + > > > > > > thiscounter + ") a").bind('mousedown', { section: ":Community" + > > > > > > thiscounter }, mousedownSearchTracking); > > > > > > }); > > > > > > > // Sort strip links > > > > > > $("div.r-sort-strip-top a.showall").bind('mousedown', { section: > > > > > > ":SortStripShowAll" }, mousedownSearchTracking); > > > > > > $("div.r-sort-strip a.r-sort-prev").bind('mousedown', { section: > > > > > > ":SortStripPrevPage" }, mousedownSearchTracking); > > > > > > $("div.r-sort-strip a.r-sort-next").bind('mousedown', { section: > > > > > > ":SortStripNextPage" }, mousedownSearchTracking); > > > > > > $("div.r-sort-strip-top a[trackcat='switchtopaged']").bind > > > > > > ('mousedown', { section: ":SortStripSwitchToPaged" }, > > > > > > mousedownSearchTracking); > > > > > > $("div.r-sort-strip > > ... > > read more »