0 Replies Latest reply on Jun 7, 2010 6:14 AM by cfsetNewbie

    Java Error for slideshow

    cfsetNewbie Level 1


      I wrote a small slide show app using dhtml and ajax. (java) I have everything working accept the pop up window, I get a java error when I try and click on the link for the larger image. Can anyone help me figure out how to fix this error?


      This is my error:

      "objectPhotoSlide" is undefined line 14

      Line 14 is this code in my java file:
      objectPhotoSlide.innerHTML='<img src="'+ evt.src +'" id="largePhoto" alt="Large Photo" border="0"/>';


      This is my java page:

      function findLivePageWidth() {
      if (window.innerWidth)
         return window.innerWidth;
      if (document.body.clientWidth)
         return document.body.clientWidth;
      return (null); }
      function initSlides() {
      objectPhotoSlide=document.getElementById('photoSlide'); }
      function showSlide(evt) {
      objectPhotoSlide.innerHTML='<img src="'+ evt.src +'" id="largePhoto" alt="Large Photo" border="0"/>';
      objectPhotoSlide.innerHTML+='<p>' + evt.alt +'</p>';
      livePageWidth = findLivePageWidth();
      newLeft = ((livePageWidth/2)-8) - (200);
      objectSlide.style.left = newLeft + 'px';
      objectSlide.style.display = 'block';
      objectCover.style.display = 'block'; }
      function hideSlide() {
      objectSlide.style.display = 'none';
      objectCover.style.display = 'none'; }


      It is an external java script. this is the code in the main page that is supposed to be attached to this java:

      <div id="cover"> </div>
      <div id="slide" onclick="hideSlide()">
      <span class="slideControl">Click To Close&otimes;</span>
      <div id="photoSlide">Loading</div>
      <div id="photoAlbum">
      <img src="lighting/photo0.jpg" class="photoAlbumImg" alt="Testing" onclick="showSlide(this);"/>

      <!-- more images here -->



      and that's it other then the .css code. If you need to see that, I can post it as well.


      Thank you