"); NewWin.document.writeln( "[", n, "/", NOF, "] ", URLStr, "
"); NewWin.document.writeln( "
"); n++; } NewWin.document.writeln("
\nEnd
"); NewWin.document.writeln("

"); NewWin.document.writeln("

"); NewWin.document.writeln(''); NewWin.document.writeln(""); NewWin.document.writeln(""); NewWin.document.writeln(""); NewWin.document.writeln(""); NewWin.document.writeln(""); NewWin.document.writeln(""); NewWin.document.writeln('
preStr=", pre , "
fileGrp=", fileGrp, "
postStr=", post , "
sortChk=", sortFlg, "
fileAry=", fileAry.join(" ") , "
URL=
'); NewWin.document.writeln(""); window.onError = null; NewWin.document.writeln(""); NewWin.document.writeln(""); NewWin.document.close(); // ↑↑↑ 文書構築終了 debugWinWrite("文書構築終了"); if (autoFlip) { document.ctrl.autoFlip.checked = true; atID=setTimeout("execAutoFlip()",document.ctrl.flipTime.value*1000); } } // // フォームの fileGrp を整形する。 // function cleanupForm() { var pre = document.form1.preStr.value; var post = document.form1.postStr.value; var sort = document.form1.sortChk.checked; var filg = document.form1.fileGrp.value; if (sort == "true" || sort == true) {sort = 1;} else if (sort == "false" || sort == false || typeof(sort) == 'undefined') {sort = 0;} sortFlg = sort; fileGrp = filg; // ファイル名を配列へ格納 fileAry = new Array(); fileAry = filg.split(/[ \t\n,;:]+/); NOF = fileAry.length; // ファイル名のソート if (sortFlg != 0) { fileAry.sort(); } // ピリオドを含まない文字列を除外 is_periodChk = ( post.indexOf(".") < 0 ); NOF = 0; for (i in fileAry) { if (is_periodChk) { if (fileAry[i].indexOf(".") < 0) { if (debug) { NewWin.document.writeln( "ignored [" + fileAry[i] + "]
"); } fileAry[i] = ""; } } if (fileAry[i] != "") {NOF++;} } document.form1.fileGrp.value = ""; for (i=0; i < fileAry.length; i++) { if (fileAry[i] != "") { document.form1.fileGrp.value += fileAry[i] + "\n"; } } } // // 本CGIへパラメーターを入力するフォームを出力する。 // function outputQueryForm() { document.writeln(''); document.writeln(' 指定画像表示JavaScript'); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln('\n'); document.writeln('\n'); document.writeln('

'); document.writeln(' Last modified: ' + modyfiedDate + '
'); document.writeln(' [Back]'); document.writeln('

'); document.writeln(''); document.writeln('

指定画像表示JavaScript   (' +modyfiedDate+ '版)

'); document.writeln(''); document.writeln(''); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln('
前置文字列:
ファイル名: 下記に画像ファイル名を空白・タブ・改行・カンマ・コロン・セミコロンで区切って記入してください。
'); document.writeln(' '); document.writeln('
ピリオドを含まない文字列は除外されますので、
ファイルリスト表示されたページ内容をそのまま貼り付けても大丈夫です。 '); document.writeln('  (
後置文字列: '); document.writeln('  (注)後置文字列にピリオドを含んでいる場合は、ファイル名のピリオドチェックを行いません。
ソート: ファイル名のソートを行う。
'); document.writeln(' '); if (mode == "p") { document.writeln(' ← このボタンを押して下さい。 子画面を開いた後、親画面は元のページに戻ります。'); } document.writeln('
'); document.writeln(' '); document.writeln(' '); document.writeln('
'); if (debug) { // for DEBUG document.writeln('
'); } document.writeln(''); document.writeln('
'); document.writeln(''); document.writeln('

必要要件

'); document.writeln('JavaScript 1.2 以上の Web ブラウザが必要です。'); document.writeln('

解説

'); document.writeln('ひとつの URL (=フォルダー) に含まれる画像ファイル群を指定することにより、画像をまとめて表示する。'); document.writeln('
    '); document.writeln('
  1. 画像のURLを 前置文字列 + ファイル群 (+ 後置文字列) に分割してフォームに記入する。'); document.writeln('
  2. [画像表示] ボタンを押す。別ウィンドウに画像が表示される。'); document.writeln('
'); document.writeln('以上で簡単に画像群を表示できる。
'); document.writeln('
'); document.writeln('また下記のようにパラメータ(query string)を与えることもできる。
'); document.write( 'http://www.xxxx.xx.xx/displaySelectedPicture.htm?pre=xx&filg=xx&post=xx&sort=xx'); document.writeln('&wid=xx&hei=xx&mode=xx
'); document.writeln('
');
	document.writeln('pre  :“http://”から始まるURLの前置文字列');
	document.writeln('filg :ファイル名を複数指定する。 (区切り文字はカンマ・コロン・セミコロン・空白・タブ) (適宜 ISO Lathin 1 エンコードすること。)');
	document.writeln('post :後置文字列 (省略可)');
	document.writeln('sort :ファイル名のソートを行う。 (省略可)');
	document.writeln('wid  :画像幅[ピクセル] (省略時のウィンドウサイズはブラウザ既定値)');
	document.writeln('hei  :画像高[ピクセル] (省略時のウィンドウサイズはブラウザ既定値)');
	document.writeln('mode :画面親子フラグ (p:親モード(子画面を別途開いて画像表示する) , c:子モード(自画面に表示する) ,');
	document.writeln('                      k:保持モード(親モード & 画面戻さない) ) 省略時は 親モード');
	document.writeln('');
	document.writeln('パラメータ付きの親モードで実行して[画像表示]ボタンを押すと、子画面表示後に親画面は1つ前の画面に自動的に戻る。');
	document.writeln('
'); document.writeln(''); document.writeln('

'); document.writeln('更新履歴はソースに書いてあります。
'); document.writeln(''); document.writeln('
'); document.writeln(''); document.writeln('
'); document.writeln(' [JavaScript Top] [Back]
'); document.writeln('
'); document.writeln(''); document.writeln('

'); document.writeln(''); document.writeln(''); document.writeln('・ このコンテンツ/JavaScriptは著作権を留保します。
'); document.writeln('・ このコンテンツ/JavaScriptを改造する場合はオリジナル著作者のCopyrightを残してください。
'); document.writeln('・ このコンテンツ/JavaScriptを個人のコンピュータへダウンロードして個人的に使用するのはバンバンやっちゃってください。
'); document.writeln('・ でも、本ページへのリンクを張る方が便利かも。
'); document.writeln('
'); document.writeln('
'); document.writeln('Copyright (c) 2004 中司浩史(Nakatsukasa, Hiroshi)
'); document.writeln('
'); document.writeln('\n'); } // // queryStringをフォームに埋め込む。 // function fillForm() { pre = getSrchStr("pre" ); if (pre != "") document.form1.preStr.value = pre; post = getSrchStr("post"); if (post != "") document.form1.postStr.value = post; sort = getSrchStr("sort"); if (sort == "1" || sort == "true") document.form1.sortChk.checked = true; filg = getSrchStr("filg"); if (filg != "") document.form1.fileGrp.value = filg; wid = getSrchStr("wid" ); if (wid != "") document.form1.widNum.value = wid; hei = getSrchStr("hei" ); if (hei != "") document.form1.heiNum.value = hei; debugWinWrite("sort=", sort); // for DEBUG return ; } // // デバッグ用:子画面サイズ表示 // function debugDisplayInfo() { if (!window.NewWin || (window.NewWin && window.NewWin.closed)) { debugWinWrite("\nAlready closed!"); if (debug>=2) if (NewWin) debugWinWrite("NewWin.closed = " + NewWin.closed); } else { if (is_ie) { // Internet explorer 用 debugWinWrite( "\nlefttop(l,t)=" + NewWin.screenLeft + " , " + NewWin.screenTop + "\ninner(w,h)=" + NewWin.document.body.scrollWidth + " , " + NewWin.document.body.scrollHeight + "\nscreen(w,h)=" + screen.width + " , " + screen.height + "\navail(w,h)=" + screen.availWidth + " , " + screen.availHeight ); } else { // Netscape communicator 、その他 用 debugWinWrite( "\nlefttop(l,t)=" + NewWin.screenX + " , " + NewWin.screenY + "\ninner(w,h)=" + NewWin.innerWidth + " , " + NewWin.innerHeight + "\nouter(w,h)=" + NewWin.outerWidth + " , " + NewWin.outerHeight + "\nscreen(w,h)=" + screen.width + " , " + screen.height + "\navail(w,h)=" + screen.availWidth + " , " + screen.availHeight ); } } } // // デバッグ用:デバッグ画面へ表示 // // ・不定数引数を受け付ける。 例: debugWinWrite('a=' , a , ' b=' , b); // ・window オブジェクト dbgWin の定義は不要。 // ・グローバル変数 debug が 1 以上の時のみ有効。 // // ・必要であればスクリプトの先頭でグローバル変数 debug の定義を行うこと。 // debug = 1; // function debugWinWrite() { if (debug) { var i = 0; var arg = ""; var dbgWin_closed = -1; // for DEBUG // デバッグ画面が開かれていなければ、生成する。 if (!window.dbgWin || (window.dbgWin && window.dbgWin.closed)) { if (debug>=2) if (window.dbgWin) dbgWin_closed = dbgWin.closed; // for DEBUG (新規open前に保存) dbgWinFeature = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1'; if (is_nav4) {dbgWinFeature += ',dependent=1';} if (is_gecko) {dbgWinFeature += ',dialog=1';} // Mozillaではdependentだと常に前面に配置されてしまう為 dbgWinFeature = dbgWinFeature + ',screenX=608,screenY=324,left=608,top=324,width=544,height=480'; dbgWin = window.open('','dbgWin',dbgWinFeature); dbgWin.document.open(); // 構築開始 dbgWin.document.writeln('debugWinWrite: dbgWin created.\n
');	// 初期化
			if (debug>=2) dbgWin.document.writeln('dbgWin.closed=', dbgWin_closed);	// for DEBUG
		}
		dbgWin.focus();

		// 不定数引数結合
		for (i=0; i= 1.2) dbgWin.scrollTo(0, eval('dbgWin.document' + BODYSCRLHEIGHT));
	}
}


// 
// 現在のクライアント上のシステム日付を6桁の数字で表す。
//     例: 1989年01月23日 → 890123
// 
function ConvYYMMDD(dt) {
	var t_year = "00" + dt.getYear();
	t_year = t_year.substring(t_year.length-2, t_year.length);
	var t_month = "00" + (dt.getMonth() + 1);
	t_month = t_month.substring(t_month.length-2, t_month.length);
	var t_date = "00" + dt.getDate();
	t_date = t_date.substring(t_date.length-2, t_date.length);

	return t_year + t_month + t_date;
}

// 
// URLの?以降の文字列の中から指定パラメーターの値を探す。
//   見つからなければ空白を返す。
// 
// 参考文献:http://developer.netscape.com/js/ より一部引用
// 
function getSrchStr(Name) {
	var location_search = unescape(location.search);	// IEでは ISO Lathin 1 エンコードされている為。
	var srch = Name + "="
	if (location_search.length > 0) {
		offset = location_search.indexOf(srch)
		if (offset != -1) {		// if exists
			offset += srch.length
			// set index of beginning of value
			end = location_search.indexOf("&", offset)
			// set index of end of cookie value
			if (end == -1)
				end = location_search.length
			return unescape(location_search.substring(offset, end))
		}
	}
	return "";
}




//-->