<meta name="description" content="The decks we do are WATERPROOFED to withstand the harsh weather conditions of BC\'s west coast.The membrane we use is a shield of armour that protects its base from rot. Our team is powerful, our motive is unstoppable, and our work is superior." />
<meta name="keywords" content="ultimate deck, waterproofed, waterproofing, vinyl deck, Ladner, Tsawwaseen, White Rock, Vancouver, Surrey, Richmond, Burnaby, Tri-Cities, New Westminster, Langley, Maple Ridge, Abbotsford, Squamish, Whistler, railing membrane,contact,services,about,faq,photos" />
<meta name="author" content="Paul Strain"
<meta name="robots" content="index, follow" />
<div class="footerclear">
<div class="footer">
<div class="footerright">
<p><a href="mailto:info@tidytecks.ca">info@tidytecks.ca</a>
<br />
Vancouver Office - (778) 809-8439<br />
In Langley, BC - serving the Vancouver Lower Mainland</p>
function zoomIn()
{
var filename=this.src.split( "_thumb.jpg" );
box.style.background="url("+filename[0]+ ".jpg)";
}
function zoomOut()
{box.style.background="inherit";}
function init()
{
box=document.getElementById("largeviynl");
}
onload=init;
var img1viynl=document.getElementById("img1viynl");
img1viynl.onmouseover=zoomIn; ---------------------------------- LINE 20 -------------------
img1viynl.onmouseout=zoomOut;
var img2viynl=document.getElementById("img2viynl");
img2viynl.onmouseover=zoomIn;
img2viynl.onmouseout=zoomOut;
Your script must be positioned below all elements to which it refers (it isn't clear if that is the case), and you should not have global variables that clash with IDs.
Where used, return should be executed unconditionally and always as the last statement in the function.
That's my signature, it's not part of the damn post!
you are referring to an element before it is created, so you need to run that script after the element is created, move your script after viynlthumb, or simply move
var img1viynl=document.getElementById("img1viynl");
img1viynl.onmouseover=zoomIn; ---------------------------------- LINE 20 -------------------
img1viynl.onmouseout=zoomOut;
var img2viynl=document.getElementById("img2viynl");
img2viynl.onmouseover=zoomIn;
img2viynl.onmouseout=zoomOut;
Bookmarks