Body on load, doesn't seem to work?
-
Experts, I have a website i am currently (trying) to make :) I have a piece of code which goes
<body onLoad="disptime()","MM_CheckFlashVersion('7,0,0,0','Content on this page requires a newer version of Adobe Flash Player. Do you want to download it now?);DisplayDIV('SubKicks');HideDIV('LeftDiv');HideDIV('RightDiv');HideDIV('FrontDiv');HideDIV('SideDiv');">
Which doesn't seem to do what it is suppossed to do. disptime is a javaScrpt function which displayes the current time. the MM checks flash is because i have some videos i have added. Now the main thing that isn't working is this part DisplayDIV('SubKicks');HideDIV('LeftDiv');HideDIV('RightDiv');HideDIV('FrontDiv');HideDIV('SideDiv'); In my HTML code i have Display and Hide javascript functions, which will allow me to hide and show certain DIV tags. I am confused at why the body tag doesn't like the display and hiding divs as this EXACT code works fine onClick on a button..... (I need it onLoad) If anybody can help that would be great. I assume i have missed out a semi colon or something somewhere but don't actually know where!??!?!? Many thanks Dan
-
Experts, I have a website i am currently (trying) to make :) I have a piece of code which goes
<body onLoad="disptime()","MM_CheckFlashVersion('7,0,0,0','Content on this page requires a newer version of Adobe Flash Player. Do you want to download it now?);DisplayDIV('SubKicks');HideDIV('LeftDiv');HideDIV('RightDiv');HideDIV('FrontDiv');HideDIV('SideDiv');">
Which doesn't seem to do what it is suppossed to do. disptime is a javaScrpt function which displayes the current time. the MM checks flash is because i have some videos i have added. Now the main thing that isn't working is this part DisplayDIV('SubKicks');HideDIV('LeftDiv');HideDIV('RightDiv');HideDIV('FrontDiv');HideDIV('SideDiv'); In my HTML code i have Display and Hide javascript functions, which will allow me to hide and show certain DIV tags. I am confused at why the body tag doesn't like the display and hiding divs as this EXACT code works fine onClick on a button..... (I need it onLoad) If anybody can help that would be great. I assume i have missed out a semi colon or something somewhere but don't actually know where!??!?!? Many thanks Dan
<body onLoad="disptime()";"MM_CheckFlashVersion('7,0,0,0','Content on this page requires a newer version of Adobe Flash Player. Do you want to download it now?');DisplayDIV('SubKicks');HideDIV('LeftDiv');HideDIV('RightDiv');HideDIV('FrontDiv');HideDIV('SideDiv');">
Looks like you are missing the closing single quote on your string literal "Content on this page...". Also there should be a semicolon after disptime() rather than a comma
I know the language. I've read a book. - _Madmatt
-
<body onLoad="disptime()";"MM_CheckFlashVersion('7,0,0,0','Content on this page requires a newer version of Adobe Flash Player. Do you want to download it now?');DisplayDIV('SubKicks');HideDIV('LeftDiv');HideDIV('RightDiv');HideDIV('FrontDiv');HideDIV('SideDiv');">
Looks like you are missing the closing single quote on your string literal "Content on this page...". Also there should be a semicolon after disptime() rather than a comma
I know the language. I've read a book. - _Madmatt
Surely: onLoad="disptime();MM_CheckFlashVersion ...etc instead of: onLoad="disptime()";"MM_CheckFlashVersion ...etc
-
Surely: onLoad="disptime();MM_CheckFlashVersion ...etc instead of: onLoad="disptime()";"MM_CheckFlashVersion ...etc
Right, I missed removing the quotes. Error propagation by copy & paste
I know the language. I've read a book. - _Madmatt