リンクがあります。クリックすると、ブラウザの別のウィンドウが開きます (specialChars.php)
function popup_specialChars()
{
var ht;
if(window.navigator.appVersion.indexOf("MSIE 5.01") == -1)
ht = 300;
else
ht = 720;
specialCharsWindow = window.open
(
"/TradeScienceJournalSystem/specialChars.php", "special_characters",
"resizable=yes,scrollbars=yes,height=" + ht + ",width=650,dependent=yes,alwaysRaised=yes"
);
specialCharsWindow.focus();
}
<a href="javascript:popup_specialChars();" class="special">Insert Special Character</a>
<textarea name="docArticleTitle" cols="60" rows="14"></textarea>
specialChars.php
function insert_text(str)
{
alert(str);
opener.append(str); // Not working
this.window.focus();
}
<table border="1" id="table1" width="97%">
<tr>
<td align="center" class="specialcharlink"><a href="javascript:insert_text('á')"><span class="specialchar">á</span></a></td>
</tr>
</table>
特殊文字のリンクをクリックすると、insert_text() が呼び出され、アラートに特殊文字が表示されます。しかし、その文字をオープナー ウィンドウのテキスト領域に追加したいのですが、うまくいきません。
オープナーウィンドウのテキストエリアをどのように示すことができますか?