mike_g Posted April 20, 2007 Share Posted April 20, 2007 I want to draw an image in a Javascript function. I can't seem to get it to work. Heres an example of what I am doing: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html><head><title>Untitled</title><script language="JavaScript" type="text/javascript">function DrawRow(img){ document.write("<img src='"+img+"' alt='not working' />");}</script></head><body><img src="Images\Rompersuit.jpg" /><script>DrawRow("Images\Rompersuit.jpg")</script></body></html> Can someone please tell me how I could get this to work. Thanks. Link to comment Share on other sites More sharing options...
pulpfiction Posted April 20, 2007 Share Posted April 20, 2007 Try this......<script>DrawRow("Images/menuback.jpg")</script>\ is escape character in JShttp://www.htmlgoodies.com/beyond/javascri...cle.php/3470891 Link to comment Share on other sites More sharing options...
mike_g Posted April 20, 2007 Author Share Posted April 20, 2007 Oh yeah... I forgot about that. Bit of a dumb error really, but thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now