Special character inserter source. Cut and paste into a text document with a .htm or .html extension and open in a browser to test/modify.
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Andrew's javascript drop-down menu thing</title> <script language=javascript> function doChange(s) { var l = document.getElementById('wow').getElementsByTagName('span'); for (var i = 0; i < l.length ; i++) { l.style.display = i == s ? 'inline' : 'none'; l.style.visibility = i == s ? 'visible' : 'hidden'; } } </script> </head> <body> <form> <div><textarea id=text> </textarea></div> <select style="display:inline" onChange="doChange(selectedIndex)"> <option>Spanish</option> <option>German</option> <option>Esperanto</option> </select> <span id=wow> <span style="display:inline; visibility:visible"><a href="javascript:insertTags('á')">á</a><a href="javascript:insertTags('é')">é</a><a href="javascript:insertTags('í')">í</a><a href="javascript:insertTags('ñ')">ñ</a><a href="javascript:insertTags('ó')">ó</a><a href="javascript:insertTags('ú')">ú</a><a href="javascript:insertTags('ü')">ü</a></span><span style="display:none ; visibility:hidden" ><a href="javascript:insertTags('ä')">ä</a><a href="javascript:insertTags('ö')">ö</a><a href="javascript:insertTags('ß')">ß</a><a href="javascript:insertTags('ü')">ü</a></span><span style="display:none ; visibility:hidden" ><a href="javascript:insertTags('ĉ')">ĉ</a><a href="javascript:insertTags('ĝ')">ĝ</a><a href="javascript:insertTags('ĥ')">ĥ</a><a href="javascript:insertTags('ĵ')">ĵ</a><a href="javascript:insertTags('ŝ')">ŝ</a><a href="javascript:insertTags('ŭ')">ŭ</a></span> </span> </form> </body> </html>
thisisa test to see exactly what html is generated by <charinsert>