Browser Incompatibilities

I’ve spent most of the day tweaking stuff, and have come across the following issues:

  • Safari has no ability to find either the cursor position or the selection in a TextArea. This means that Quicktags will not work under Safari. I’m going to file a bug report with Apple over this one, as it’s rather crap.
  • Neither Safari nor Mozilla support onTimer(), which means my plan to have the Comment Preview update every 3 seconds rather than on every keypress will not work. I still need to try to find a way to make the Preview faster on Mozilla. It’s fine on Safari.

I’ve also spent a fair amount of time playing around with trying to get comments to appear on the front page, but I think I need to be able to access the SQL database directly, and run a query in order to do this. And store the result in a variable. But I can’t figure out how (if it’s even possible) to do this.

Quicktags Update

Note: The seperate Quicktags toolbar is not supported. Please use the full toolbox script, or hack it any way you like. The remainder of this post remains for posterity only. • I’ve combined my two quicktags scripts into one, it now has an (optional) argument to the edToolbar(); function. If you pass it the argument of ‘Link’, then it will render the toolbar as a series of <a href="javascript:..."> links, rather than the buttons that it defaults to. You can get it from here. Or use the code <script type="text/javascript" src="http://schinckel.net/images/quicktags.jpg> </script> <script type="text/javascript">edToolbar(); </script> in your page, where you want the toolbar to appear, and <script type="text/javascript"> edCanvas = document.getElementById('comment'); </script> after the TextBox you are using to have comments in (make sure it’s id is comment, or change the second script.