[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: JavaScript and tables
hello all
I finally got my graphic javascript tic tac toe up and running. coming
rip it apart please. i had to do stuff in the code that i do not think
should need to be done. all the pertinent code is in the frame document
called index.html -- their is a little trivial stuff in head.html if you
want to look at everything. the stuff that seems unnecessary to me is,
when you click on a square i have this happen
setTimeout to call the real function
figure everything out
open and close a stream of type "text/plain" to clear the doc
open, write to, and close a standard html stream
if i do not use setTimeout, and if i do not open and close the plain
data stream before writing my next board, the board is appended under
the current board. i have a background viewer that does the same thing
-- generating output to one frame -- but it does not need the extra
stuff to write. the pertinent difference is that the tic tac toe game
writes to the frame that the click occured in. doing this seems to
change the behavior of netscape. clicking on the word tic tac toe in
the title frame starts a new game, and it worked correctly before i had
the extra writing calls. the setTimeout disconnects the call from the
active frame and the plain data stream clears the data that doc.clear()
does not. these kludges should, IMHO, be worked out.
tic tac toe: http://hero.com:80/~eric/ttt/index.html
backgrounds: http://hero.com:80/~eric/bg/index.html
mailto:slb2@axe.humboldt.edu
Eric
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/