01.
<html>
02.
<head>
03.
<title>test</title>
04.
<script language=
"JavaScript"
>
05.
function
js_popup(theURL,width,height) {
06.
var
textfield = document.getElementById(
'textfield'
).value;
07.
theURL +=
'?textfield='
+textfield;
08.
leftpos = (screen.availWidth - width) / 2;
09.
toppos = (screen.availHeight - height) / 2;
10.
window.open(theURL,
"viewdetails"
,
"width="
+ width +
",height="
+ height +
",left="
+ leftpos +
",top="
+ toppos);
11.
}
12.
</script>
13.
</head>
14.
<body>
15.
<form name=
"frmMain"
action=
""
method=
"post"
>
16.
<input type=
"text"
name=
"textfield"
id=
"textfield"
>
17.
<select name=
"select"
id=
"select"
>
18.
<option>รหัส</option>
19.
<option>ชือ</option>
20.
<input type=
"button"
name=
"button"
value=
"submit"
onClick=
"js_popup('kkk1.php',350,400); return false;"
>
21.
</form>
22.
</body>
23.
</html>