ああ、なんだかもうくたびれました。

もう帰ります。

その前に本日覚えたことを復習のコーナー!

フォームを別WindowにPOSTをしたい場合、手こずったのでメモ。

<form id=”hoge” name=”hoge” method=”post” target=”hoho” action=”hoge.php” onsubmit=” wop(‘hoge.php’, ‘hoho’,’800′,’600′);”>

これがformタグの設定

function wop(url, name, width, height)
{
var option = “scrollbars=no,resizable=yes,width=” + width + “,height=” + height;
hoho = window.open(url, name, option);
window.hoho.focus();
}

これがJavaScriptの設定

JavaScriptはふつうによくあるWindowオープンのソースのままで、formタグの中にtarget=”ウィンドウ名”の属性を入れてあげるだけ。

これってやりたい人がいそうな割に記事があまりなかった。

この記事を参考に試してみたらできた。

よかったよかった。

ツイートツイート

Related posts:

  1. PHPのユーザー定義関数で複数の戻り値がほしいんだ!
  2. PHPでOOP
  3. Dreamweaver8のバグ
  4. 今日のお勉強
  5. セキュリティソフトな詐欺?

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

   
© 2011 LEGGODT.COM Suffusion theme by Sayontan Sinha