Upon upload completion, my newly uploaded file has the URL of
<div id="uploaded-file">
<img src="http://path-to-my-file.jpg" />
</div>
How do I get the URL of that uploaded file into my script?
<script>
script stuff.use this.etc
('http://path-to-my-file.jpg')
});
</script>
Thanks in advance for any assistance!
EDIT:
I used:
<script>
var myurl = document.getElementById("uploaded-file").getElementsByTagName("img")[0].src;
</script>
then replace the hardcoded url:
Layer_3.mousedown(function() { this.animate({ fill:
'url("http://farm5.staticflickr.com/4067/4584507098_b887327eae.jpg")' }, 600); });
with
Layer_3.mousedown(function() { this.animate({ fill: 'url(' + myurl + ')' }, 600); });
Something like:
Using jQuery (though you could use vanilla JS instead)...
You then have the src as a variable...
(That's all I can give you without more information. There are probably better ways of doing this, but your initial problem isn't really clear...)