OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
onClick inside document.write()
This page's ID:
21333
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I am trying to figure out why [code] document.write('<img src="empty.gif" onClick="src="black.gif"">'); [/code] doesnt work, and particularly [code] document.write("<TD> <img src="+goBoard[i][j].src+" onClick='src="+black.src+"></TD>"); [/code] where goBoard[x][y] holds an image and black is a variable that that holds a different image. Both strings work perfectly without the onClick function, but both break down when onClick is inserted. I am trying to change the source of the image when it is clicked. I need to use document.write since Im creating HTML table filled with images out of JavaScript. So my main question is why does onClick give me trouble when using it inside document.write in this case? Please help [url=http://www.artcenter.ac/asptamer] [img]http://www.artcenter.ac/asptamer/sig/asptamer.gif[/img] [/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »