Quote:
Originally Posted by sarettah
That is not a loop. That is a straight line. A loop repeats.
Now, what are you trying to accomplish, beyond what you have already said?
What triggers this to happen?
So, we have a page and when the page first comes up, there is an image.
On some trigger (unknown at this time) you want the image name to be edited on the fly to another image (image).
Am I on the right track?
edited in: This code: so that the code looks like
<img src = "<script>blahblah</script>">
Is not the way to implement anything. The only time that img tag is looked at would be at page load. aSince the script would be an invalid img ref it would just error out.
The code that was posted in response would have to be run at the end of page load or when something triggered it (as I describe above).
.
|
Hi Sarah,
I will clarify:
It is a loop because it is loading a bunch of pictures, one after another. The program doing it is outputting to HTML. Unfortunately I can't edit that program at the moment, so I'm looking to edit the HTML side instead.
The string that the code generates looks like this:
Code:
http://1.1.1.1/images/picture1.jpg
And if I place that string in an IMG tag it loads the image. Fine.
But what I want to do is use some javascript to alter that string before placing it in the image tag.
Does that make sense? Or am I losing my marbles?