MDanz Posted September 19, 2009 Share Posted September 19, 2009 heres what i've done so far <textarea name="reply" cols="118" rows="15" wrap="hard" id="reply" style="color:white; background-image:url($image); border-color:#FBB917" readonly="readonly"> how do i do the function? the hyperlink for the image is $image, which i get from a while loop, how do i display image as textarea background via function? onmouseover=\"ChgText($number)\ <script type='text/javascript'> function ChgText(number){ } </script> Quote Link to comment Share on other sites More sharing options...
MDanz Posted September 20, 2009 Author Share Posted September 20, 2009 i tried this but the background of the textarea turns white <script language="javascript" type="text/javascript"> function ChgText(number) { var newtext = document.getElementById(number).innerHTML document.getElementById('reply').style.backgroundImage = "url(newtext)"; } </script> var newtext = document.getElementById(number).innerHTML this is the hyperlink of the html 'reply' is the value of the textarea.. i want the background image to change to 'newtext' how do i do that? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.