ボタンによってtargetの属性を変えたい
押すボタンによって(下記サンプルリストはtest.gif画像によって)同じフレームに表示したり、新しいフレームに表示したり分けたいと思っています。
下記のサンプルリストは./image/test.gifボタンを押した際に新しい画面を開いて表示するように作りました。
---------------------------------
function play_all(file_name,select_file){
document.forms["select_list"].action = "playall.php";
document.forms["select_list"].target.value = "_blank";
document.forms["select_list"].file_name.value = file_name;
document.forms["select_list"].path_file.value = select_file;
document.forms["select_list"].submit();
}
・・・
<form id="select_list" action="" method="post" target="_self">;
<a href="#" onClick="play_asx('test','test.txt');">
<IMG SRC="./image/test.gif">
</a>
</form>
---------------------------------
しかし、新しい画面はできずに同じウィンドウに表示されます。targetを変えているのですが効いていない様子です。
何か文法が間違っているのでしょうか。Googleで探しましたが見つけ切れませんでした。ご存知の方、ご教授ください。