bloggertech
April 6, 2002
Posting a textarea
Since I've seen a couple of mentions lately of the problems associated with posting a <textarea> in a Blogger post, I thought I'd post my solution: write the <textarea> in javascript.
The problem: when you try to edit a post which contains a <textarea>, and thus also a </textarea>, the <textarea> in the Blogger interface where you edit your post is prematurely closed by the </textarea> in your post, causing you to lose everything after that in your post. Ouch.
The solution: rather than posting the <textarea> directly, write it with javascript:
<script type="text/javascript">
document.write("<" + "textarea rows='25' cols='50'><" + "/textarea>")
</script>
<noscript>Javascript required. Sorry.</noscript>
Archives:
Mar. 31 02 - Apr. 06 02
Feb. 17 02 - Feb. 23 02
Feb. 03 02 - Feb. 09 02
Jan. 27 02 - Feb. 02 02
Jan. 20 02 - Jan. 26 02
Jan. 13 02 - Jan. 19 02
Jan. 06 02 - Jan. 12 02
Dec. 30 01 - Jan. 05 02
Dec. 23 01 - Dec. 29 01
Dec. 16 01 - Dec. 22 01
Nov. 25 01 - Dec. 01 01
Nov. 18 01 - Nov. 24 01
Nov. 11 01 - Nov. 17 01
Mar. 31 02 - Apr. 06 02
Feb. 17 02 - Feb. 23 02
Feb. 03 02 - Feb. 09 02
Jan. 27 02 - Feb. 02 02
Jan. 20 02 - Jan. 26 02
Jan. 13 02 - Jan. 19 02
Jan. 06 02 - Jan. 12 02
Dec. 30 01 - Jan. 05 02
Dec. 23 01 - Dec. 29 01
Dec. 16 01 - Dec. 22 01
Nov. 25 01 - Dec. 01 01
Nov. 18 01 - Nov. 24 01
Nov. 11 01 - Nov. 17 01