Need help with javascript code displaying at top of wepage
Hi,
Bottom line is I have a website TEMPLATE that is displaying, code text, at the top of a webpage and then at the bottom the webpage displays correctly and functions as it should. I have restored a functioning website from a previously made backup from the host. So, showing you live would do no good as it appears ok now. Problem is that I need that template itself corrected.(Which wasn't backed up at the host and apparantly my Carbonite backup was corrupted as well.) Problem that the top of the template page is displaying live view such as this:
function(element, className) { return $A($(element).childNodes).collect( function(node) { return (node.nodeType==3 ? node.nodeValue : ((node.hasChildNodes() && !Element.hasClassName(node,className)) ? Element.collectTextNodes(node) : '')); }).flatten().join(''); } Element.setStyle = function(element, style) { element = $(element); for(k in style) element.style[k.camelize()] = style[k]; } Element.setContentZoom = function(element, percent) { Element.setStyle(element, {fontSize: (percent/100) + 'em'}); if(navigator.appVersion.indexOf('AppleWebKit')>0) window.scrollBy(0,0); } Element.getOpacity = function(element){ var opacity; if (opacity = Element.getStyle(element, 'opacity')) return parseFloat(opacity); if (opacity = (Element.getStyle(element, 'filter') || '').match(/alpha\(opacity=(.*)\)/)) if(opacity[1]) return parseFloat(opacity[1]) / 100; return 1.0; } Element.setOpacity = function(element, value){ element= $(element); if (value == 1){ Element.setStyle(element, { opacity: (/Gecko/.test(navigator.userAgent) &&
That's just a small part of it.
History: It previously was working perfectly. I used Lightbox JS from here and Dreamweaver to design and publish the site. I haven't touched this code for over a year, that I remember. A few days ago I needed to update it. I went back in and opened the local template to update a date, updated all of the pages then uploaded those. That is when the error became obvious.
I know it's something as simple as a bracket that has been deleted or something but for the life of me I cannot figure out what to do. I don't write code. I can work with copy and so forth.
I was wondering if there is something just clearly obvious in code, that I could locate myself, that might be causing this to display?
Many thanks,
Mark