Marshall

msg:4410777 | 6:55 pm on Jan 25, 2012 (gmt 0) |
Does it need/have: <body onload="FUNCTION"> Marshall
|
ZakAltF4

msg:4410780 | 6:57 pm on Jan 25, 2012 (gmt 0) |
NO .. Should I put it inside a function and call it from OnLoad? -- On second thought ... We are using an E-commerce CMS, our <body> tag is dynamically generated ... I will have to find another method here ..
|
Marshall

msg:4410790 | 7:11 pm on Jan 25, 2012 (gmt 0) |
My JavaScript knowledge is limited and I was just looking at what might have been obvious as I have often overlooked the obvious. (I know, no help) I am sure one of the many experts on WebmasterWorld will be able to help you further. Marshall
|
Fotiman

msg:4410804 | 7:46 pm on Jan 25, 2012 (gmt 0) |
Your script is trying to access #js_test before it exists. Move your script to the end of the page, just before the closing </body> tag and it should work.
|
rocknbil

msg:4411165 | 5:48 pm on Jan 26, 2012 (gmt 0) |
$(function(){ $("#js_test").html('This will be dynamic content run by Javascript ... '); )};
If that doesn't work,
$(window).load( function() { $("#js_test").html('This will be dynamic content run by Javascript ... '); });
You should move it to the bottom in any case, but also get in the habit of wrapping jQuery selectors in $(function()) or $(window).load().
|
ZakAltF4

msg:4411171 | 6:05 pm on Jan 26, 2012 (gmt 0) |
Fotiman ... wow .. You know I always try to do that, and in this case it was difficult because of the include structure, and it totally escaped my thought! Thank you for that insight, fixed it right up! rocknbil, I tried .load, but no avail .. Just needed to move the script under the object... Thanks all for your insight!
|
|