[ale] OT: Wordpress and javascript problem

Jim Seymour jim at wingbarscafe.com
Wed Oct 17 21:37:57 EDT 2007


On Wed, 2007-10-17 at 19:58 -0400, joh6nn wrote:
> Jim Seymour wrote:
> > <body onload="webCamInit();">
> you might try changing this to
> 
> <script> window.onload = webCamInit; </script>
> 
> and putting it somewhere in the head.  i've found that to be a bit more 
> reliable than "body onload".
> 
> 
> > <script type="text/javascript"><!-- webCamDraw(0); //--></script>
> at a guess this is at least part of your problem.  most javascript 
> parsers recognize <!-- as a comment. the whole "<!-- //-->" idiom is 
> specifically to hide JS from browsers so old that they don't understand 
> the <script> tag.  unless you've got IE 3 popping up in your apache 
> logs, you can safely do away with it, and just put:
> <script type="text/javascript"> webCamDraw(0); </script>

Thanks,

Cool. I may give that other script a try with the changes suggested.
Right now I managed to get a different script working. I'll test it out
for a while and decide which way to head.

Thanks Again,

Jim



More information about the Ale mailing list