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
[b]asptamer:[/b] Hi, it seems to be a simple problem of quotes escaping. The first document.write should be[code]document.write( '<img src="empty.gif" onClick="src=\\'black.gif\\'">' );[/code]and the second[code]document.write("<TD> <img src='"+ goBoard[i][j].src +"' onClick='src=\\""+ black.src +"\\"' ></TD>");[/code]I've tested the 2 with success with IE6. [edit] HINT: To avoid that kind of problem in the future, always double check the HTML you generate by throwing it in an [i]alert( )[/i] or a [i]textarea[/i]. ;) [/edit] Cheers, [url=http://www.p01.org/] [img]http://poi.ribbon.free.fr/files/p01_ozoneasylum_sig_love.gif[/img] [/url] [small](Edited by [internallink=2185]poi[/internallink] on 04-13-2004 20:27)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »