Hi all and Eric:

I am trying to get timed popups to work for a reminder system in
tbGTD. I have most of the code
working, but trying to use document.write to write content into the
popup window
doesn't work since the InlineJavascriptPlugin substitutes
document.write so that
document.writes will write into the tiddler with the script.

But what I want to have work is something like:

     var timerID = window.setTimeout("var
win=window.open('','','height=200,width=300,status=0,titlebar=1');
              win.moveTo(100,100); win.document.title='timed event';
              win.document.write('<H1>This is a reminder</H1>');
              win.focus();", 5000);

where the popup window has the contents "This is a reminder" formatted
as a level 1 header.

I wonder if a simple change to InlineJavascript from:

  var fixup=code.replace(/document.write\s*\(/gi,'place.bufferedHTML
+=(');

to

  var fixup=code.replace(/([^.])document.write\s*\(/
gi,'$1.place.bufferedHTML+=(');

(assumeing $1 can be used to substitute the subpattern) so that an
unqualified document.write
is replaced but  *.document.write is not replaced.

-- rouilj


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to