Click here to Skip to main content


AnswerRe: help me please [modified] PinmemberLeon Munir25-Nov-12 13:46 
GeneralRe: help me please PinmemberJ4amieC25-Nov-12 21:13 
GeneralRe: help me please PinmemberLeon Munir26-Nov-12 2:06 
GeneralRe: help me please PinmemberJ4amieC26-Nov-12 5:30 
GeneralRe: help me please PinmemberMarcus Kramer26-Nov-12 5:37 
GeneralRe: help me please Pinmemberdoa'a_9226-Nov-12 9:28 
Questiononmouseover and document.getElementById PinmemberSRJ9223-Nov-12 4:18 
AnswerRe: onmouseover and document.getElementById PinmemberJ4amieC23-Nov-12 4:48 
An HTML page is interpreted top to bottom. When your javascript runs (in the head) the HTML has not yet been parsed, and therefore does not exist.
Put everythng into a function
function runMeOnLoad(){
    var galleryImg = document.getElementById('image');
    var bar = document.getElementById('imgBar');
    galleryImg.onmouseover = function ()
    { = "block";
    galleryImg.onmouseout = function ()
    { = "none";
And execute onload
<body onload="runMeOnLoad()">

GeneralRe: onmouseover and document.getElementById PinmemberSRJ9223-Nov-12 5:49 
AnswerRe: onmouseover and document.getElementById Pinmemberjainsachin30-Nov-12 9:17 
Questiondisplaying different contentunder single layout Pinmemberradha123 from Hyderabad23-Nov-12 3:32 
AnswerRe: displaying different contentunder single layout Pinmembermanojwadnere28-Dec-12 0:07 
QuestionRegular expression PinmemberMember 962181822-Nov-12 2:25 
AnswerRe: Regular expression [modified] Pinmembern.podbielski22-Nov-12 20:00 
GeneralRe: Regular expression PinmvpManfred R. Bihy22-Nov-12 21:20 
GeneralRe: Regular expression Pinmembern.podbielski23-Nov-12 21:15 
Questionform validation Pinmembertherainking7821-Nov-12 22:07 
AnswerRe: form validation PinmvpRichard MacCutchan21-Nov-12 22:17 
GeneralRe: form validation Pinmembertherainking7828-Nov-12 13:14 
AnswerRe: form validation PinmemberbVagadishnu28-Nov-12 11:14 
GeneralRe: form validation Pinmembertherainking7828-Nov-12 13:17 
Questionopeing a new window in JS after time interval PinmemberWaqasCheema20-Nov-12 23:36 
AnswerRe: opeing a new window in JS after time interval PinmemberAndrew Stoute30-Nov-12 4:51 
QuestionDraw circuit diagram using javascript Pinmemberanishkannan18-Nov-12 22:31 
AnswerRe: Draw circuit diagram using javascript Pinmembern.podbielski19-Nov-12 21:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 29 Jul 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid