50 function submit_withpar(height,width,name,[id],url) {
51 subwindow(height,width,name,url+\'&[id]=\'+[id]);
55 var
$jsmaincall =
'submit_withpar([height],[width],\'[name]\',\'[id]\',\'[url]\')';
58 <form name="[name]" method="POST" action="[url]">
60 <input type="hidden" name="[name]" value="[val]"> [ENDBLOCK PAR]
66 var p = self.opener.document.forms.[name];
67 var lf = self.document.[name];
69 if( lf.[name] ) { p.[name].value = lf.[name].value; } [ENDBLOCK PAR]
72 if( lf.[name] ) { p.[name].value = lf.[name].options[lf.[name].selectedIndex].value; } [ENDBLOCK SEL]
79 function SubForm(
$name, $width = 100, $height = 100, $mainurl =
"", $suburl =
"")
82 $this->width = $width;
83 $this->height = $height;
84 $this->mainurl = $mainurl;
85 $this->suburl = $suburl;
90 $this->param = array_merge($array, $this->param);
95 $this->param[$key][
"val"] = $val;
96 $this->param[$key][
"typ"] =
$type;
106 $lay =
new Layout(
"", null, $this->mainform);
110 while (list($k, $v) = each($this->param)) {
111 $tab[
$c][
"name"] = $k;
112 $tab[
$c][
"val"] = $v[
"val"];
115 $lay->SetBlockData(
"PAR", $tab);
116 $lay->Set(
"url", $this->mainurl);
117 $lay->Set(
"name", $this->name);
118 return ($lay->gen());
123 $lay =
new Layout(
"", null, $this->mainjs);
124 $lay->Set(
"formname", $this->name);
125 $lay->Set(
"id", $this->key);
126 return ($lay->gen());
131 $lay =
new Layout(
"", null, $this->subjs);
135 while (list($k, $v) = each($this->param)) {
136 if ($v[
"typ"] ==
"sel") {
138 $tabsel[$isel][
"name"] = $k;
141 $tab[
$c][
"name"] = $k;
145 $lay->SetBlockData(
"SEL", $tabsel);
147 $lay->SetBlockData(
"SEL", NULL);
150 $lay->SetBlockData(
"PAR", $tab);
152 $lay->SetBlockData(
"PAR", NULL);
154 $lay->Set(
"name", $this->name);
155 return ($lay->gen());
160 $lay =
new Layout(
"",
"", $this->jsmaincall);
161 $lay->Set(
"url", $this->suburl);
162 $lay->Set(
"width", $this->width);
163 $lay->Set(
"height", $this->height);
164 $lay->Set(
"name", $this->name);
165 return ($lay->gen());
170 $lay =
new Layout(
"",
"", $this->jsmaincall);
172 $lay->Set(
"url", $this->suburl);
173 $lay->Set(
"width", $this->width);
174 $lay->Set(
"height", $this->height);
175 $lay->Set(
"name", $this->name);
176 return ($lay->gen());