привет! вот что у меня получилось.
<html><head>
<link rel="shortcut icon" href="l.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META http-equiv=Content-Language content=es><Meta name="leon" Content="php5">
<Meta name="Description" Content="empresa"><Meta name="Keywords" Content="empresa">
<META content=all name=robots>
<title>: registry text</title>
</head>
<script language="JavaScript">
function maxlength_lang(form){
var a = new Array();
switch (form.catalog1.value){
case '0':
a=0;
break;
case '1':
a=0;
break;
case '2':
a=0;
break;
}
var maxlength=201+a;
str=form.message.value;
dlina=str.length;
if(dlina>maxlength)form.message.value=str.substring(0,maxlength);
form.lang.value=(maxlength-dlina);}
required = new Array("mailto", "mailfrom", "subject", "message");
required_show = new Array("1", "2", "Tema", "Message");
function SendForm () {
var i, j;
for(j=0; j<required.length; j++) {
for (i=0; i<document.forms[0].length; i++) {
if (document.forms[0].elements[i].name == required[j] && document.forms[0].elements[i].value == "" ) {
alert('Texto "' + required_show[j] + '"');
document.forms[0].elements[i].focus();
return false;
}
}
}
return true;
}
</script>
<BODY OnLoad="window.defaultStatus='Leon'" bgcolor="#000000">
<form name="gbook" target="_self" method="post" action="gbook_add.php">
<table cellSpacing=1 cellPadding=1 width="400" BGCOLOR="#FF8040" align="left" border=1>
<tr>
<td bgcolor=#FF8040 width="100%" align="left">
<table cellSpacing=1 cellPadding=1 width="100%" BGCOLOR="#FF8040" align="left" border=1>
<tr>
<td width="60%"><font color="#000000" size=-1><b> language:</b></font></td>
<td width="40%">
<select name="catalog1" onchange="reName(document.gbook)">
<option value="0">--------------------------------</option>
<option value="deutsch">deutsch</option>
<option value="english">english</option>
<option value="russian">russian</option>
<option value="spain">spain</option>
<option value="italia">italia</option>
<option value="0">--------------------------------</option>
</select><br /></td>
</tr>
<tr>
<td width="60%"><font color="#000000" size=-1><b> category:</b></font></td>
<td width="40%">
<select name="catalog2" onChange="redirect(this.options.selectedIndex);" onClick="redirect(this.options.selectedIndex);">
<option value="0" id="0">--------------------------------</option>
<option value="auto" id="1">auto</option>
<option value="computer" id="2">computer</option>
<option value="games" id="3">games</option>
<option value="programs" id="4">house</option>
<option value="house" id="5">programs</option>
<option value="work" id="6">work</option>
</select><br />
</td></tr>
<tr>
<td width="60%"><font color="#000000" size=-1><b> subcategory:</b></font></td>
<td width="40%">
<select name="catalog3" onchange="modelvalue();">
<option value="">--------------------------------</option>
</select><br />
</td></tr>
<script>
var groups=document.gbook.catalog2.options.length
var group=new Array(groups)
for (i=0; i<groups; i++)
group[i]=new Array()
group[0][0]=new Option("--------------------------------","0")
group[1][0]=new Option("car","1")
group[1][1]=new Option("van","2")
group[1][2]=new Option("truck","3")
group[2][0]=new Option("monitor","4")
group[2][1]=new Option("pc","5")
group[2][2]=new Option("subjects","6")
group[3][0]=new Option("consol","7")
group[3][1]=new Option("pc","8")
group[4][0]=new Option("apartment","9")
group[4][1]=new Option("house","10")
group[5][0]=new Option("linux","11")
group[5][1]=new Option("win","12")
group[6][0]=new Option("search","13")
group[6][1]=new Option("work","14")
document.gbook.catalog2.index = document.gbook.catalog2.options[0].text;
var temp=document.gbook.catalog3;
function redirect(x){
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<group[x].length;i++){
temp.options[i]=new Option(group[x][i].text,group[x][i].value)
}
var prevalue = document.catalog2.value
var sufvalue = temp.value
document.revision.productid.value=(prevalue+"-"+sufvalue)
}
function modelvalue(){
var prevalue2=document.gbook.catalog2.value
var sufvalue2=document.gbook.catalog3.value
document.revision.productid.value=(prevalue2+"-"+sufvalue2)
}
</script>
<tr>
<td width="60%"><font color="#000000" size=-1><b> name:</b></font></td>
<td width="40%"><input type=text name=username size=22 maxLength="40" onMouseOver="this.style.backgroundColor='#EA1213';" onMouseOut="this.style.backgroundColor='#ffffff'"></td>
</tr>
<tr>
<td width="60%"><font color="#000000" size=-1><b> country:</b></font></td>
<td width="40%"><input type=text name=country size=22 maxLength="40" onMouseOver="this.style.backgroundColor='#EA1213';" onMouseOut="this.style.backgroundColor='#ffffff'"></td>
</tr>
<tr>
<td width="60%"><font color="#000000" size=-1><b> city:</b></font></td>
<td width="40%"><input type=text name=city size=22 maxLength="40" onMouseOver="this.style.backgroundColor='#EA1213';" onMouseOut="this.style.backgroundColor='#ffffff'"></td>
</tr>
<tr>
<td width="60%"><font color="#000000" size=-1><b> address:</b></font></td>
<td width="40%"><input type=text name=address1 size=22 maxLength="60" onMouseOver="this.style.backgroundColor='#EA1213';" onMouseOut="this.style.backgroundColor='#ffffff'"></td>
</tr>
<tr>
<td width="60%"><font color="#000000" size=-1><b> telephone:</b></font></td>
<td width="40%"><input type=text name=tel size=22 maxLength="40" onMouseOver="this.style.backgroundColor='#EA1213';" onMouseOut="this.style.backgroundColor='#ffffff'"></td>
</tr>
<tr>
<td width="60%"><font color="#000000" size=-1><b> e-mail:</b></font></td>
<td width="40%"><input type=text name=email size=22 maxLength="40" onMouseOver="this.style.backgroundColor='#EA1213';" onMouseOut="this.style.backgroundColor='#ffffff'"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table cellSpacing=1 cellPadding=0 width="400" height=15% BGCOLOR="#FF8040" align="center" border=0>
<tr>
<td bgcolor=#FF8040 width="100%" align="center"><br>
<b>Quantity of symbols <input type="text" name="lang" size="2" value="201"> text</b><br>
<textarea name=message rows="10" cols="43" onChange="maxlength_lang(document.gbook)" onKeyUp="maxlength_lang(document.gbook)" onKeyDown="maxlength_lang(document.gbook)" onClick="maxlength_lang(document.gbook)" onKeyPress="maxlength_lang(document.gbook)"></textarea>
<br><br><input type="submit" name="send" value="> > > > > >"><br><br>
<br>
</td>
</tr></table>
</td>
</tr>
</table>
</form>
<SCRIPT language="Javascript">
<!--
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2) {
(message);
return false;}}}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;
}else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
-->
</SCRIPT>
</body>
</html>
но при передачи на "gbook_add.php " не видит value=catalog3.
т.е. когда я прописываю папки например : $catalog1+catalog2+"base.dat". все впорядке!!!
но если написать $catalog1+$catalog2+$catalog3+"base.dat" выдает ошибку - не может открыть файл. я и подумал что value(catalog3) не определяется???
что делать????? :confused: