lostron
08-23-2008, 04:52 AM
Very very simple javascript but giving me a little problem.
I have an input box.
<input name="imageurl" type="text" id="imageurl" value="http://www." size="75">
Then a preview link that changes the background image of a certain div:
<a href="#" onClick="document.getElementById('container').style.backgroundImage= 'url(ImageHere)' " >Preview</a>
As you can see, if the "ImageHere" was a static image it works perfectly. However, i want it to take the value of the imageurl input text.
How can I do this?
:thumbsup:
I have an input box.
<input name="imageurl" type="text" id="imageurl" value="http://www." size="75">
Then a preview link that changes the background image of a certain div:
<a href="#" onClick="document.getElementById('container').style.backgroundImage= 'url(ImageHere)' " >Preview</a>
As you can see, if the "ImageHere" was a static image it works perfectly. However, i want it to take the value of the imageurl input text.
How can I do this?
:thumbsup: