[ale] OT: Javascript help.....again

Jim Seymour jim at wingbarscafe.com
Wed Nov 7 11:41:02 EST 2007


On Wed, 2007-11-07 at 09:22 -0500, Bj?rn Gustafsson wrote:
> Hi Jim,
> 
> I took a quick look at your javascript and I think this is the culprit:
> 
> document["webCam_"+this.camNum].src =
> document["webCamPreload_"+this.camNum].src;
> 
> You are referencing the DOM there in a way that I expect won't work.
> Because your image is inside multiple DIV levels within the document,
> you must either explicitly include the document hierarchy in the
> references above, or use document.getElementById() (or a similar call)
> to fetch the image elements.
> 
> You should be able to replicate the problem in a static HTML page by
> copying the DOM structure from your wordpress environment.  You should
> be able to simply save off the content to an HTML file and still see
> the failure.  If that doesn't also fail, then my guess about the
> nature of the problem is wrong.
> 
> 2007/11/7, Jim Seymour <jim at wingbarscafe.com>:
> > Hi All,
> >
> > The latest update to WordPress on my Debian Testing box has killed the
> > javascript that loads the webcam functions. I have installed firebug in
> > firefox and am getting a green circle with a check mark in it when
> > viewing the page with the javascript. The script still fails to update
> > the image. I now have two different javascripts for a webcam that will
> > not work inside WordPress. WordPress claims it is very rare that a
> > javascript will not work. I have found a php script for this same
> > feature, however it is very vague in the configuration details and I am
> > waiting to hear back from the author. In the meantime, does anyone have
> > any idea on how to find what is going wrong here? If you want to view
> > the problem yourself, go to http://www.wingbarscafe.com and go to the
> > Feeder cam link on the right side of the page. It i supposed to update
> > every 10 seconds. Both of these javascripts work perfectly outside of
> > WordPress.
> >

Hi Bj?rn,

I am sorry, however I really do not know how to do what you are
suggesting above as a test.
Quote:
>"You should be able to replicate the problem in a static HTML page by
> copying the DOM structure from your wordpress environment.  You should
> be able to simply save off the content to an HTML file and still see
> the failure.  If that doesn't also fail, then my guess about the" <snip>

If you can point me to a reference as to how to do this, I will give it
a shot. Were you just talking about using View Source from Firefox and
saving it to a .htm page? If so, then you are correct and it fails that
way as well.

Thanks,

Jim



More information about the Ale mailing list