HTTrack Website Copier
Free software offline browser - FORUM
Subject: javascript problem
Author: Sid
Date: 06/29/2005 17:46
 
Hi,
I use HTTrack for some months and I just face a problem on JS.

On a page there is the script below to load an image.
The page is called with the path of the image as variable.
And HTT does not get the image but just error.gif.

Is there any way for HTT to interpret the script ? It looks like it just
cannot execute the script.


Thx
Sid



function imageError(theImage) {
theImage.src = 'error.gif';
}

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
  alert('Query Variable ' + variable + ' not found');
}

document.write('<div id="imgGal"><center><img
src="'+getQueryVariable("image")+'" border="0" onError="imageError(this)"
onAbort="imageError(this)"></center></div>');

</script>
<noscript>
To view the images in fullsize you need a javascript capable browser.
</noscript>

 
Reply


All articles

Subject Author Date
javascript problem

06/29/2005 17:46
Re: javascript problem

07/04/2005 00:55
Re: javascript problem

07/05/2005 11:55
Re: javascript problem

07/05/2005 15:53
Re: javascript problem

07/06/2005 00:31
Re: javascript problem

07/06/2005 14:22




6

Created with FORUM 2.0.11