Dopo averci sbattuta la testa per giorni sono arrivato a questa soluzione perchè non riesco a far funzionare i campi hiden
<?php
/*-- inizio codice campi form -*/
$db =& JFactory::getDBO();
/*-- collegamento al DB -*/
/*-- ricerca stato -*/
$query = "
SELECT `id`, `name`
FROM `#__stati` ORDER BY `name`";
$db->setQuery($query);
$nomes = $db->loadAssocList();
$option_sta="";
foreach ( $nomes as $v ) {
$selected="";
$id = $v['id'];
$stato = $v['name'];
if (JRequest::getVar('stato',0,'GET','INT')==null&&$id==353){
$selected="selected";
} else if ($id==JRequest::getVar('stato',0,'GET','INT')) {
$selected="selected";
}
$option_sta.="<option value=\"$id\" $selected>$stato</option>\n";
}
/*-- ricerca regione -*/
$query = "
SELECT `id`, `name`
FROM `#__regione` ORDER BY `name`";
$db->setQuery($query);
$nomes = $db->loadAssocList();
$option_reg="";
foreach ( $nomes as $v ) {
$selected="";
$id = $v['id'];
$regione = $v['name'];
if ($id==JRequest::getVar('regione',0,'GET','INT')) {
$selected="selected=\"selected\"";
}
$option_reg.="<option value=\"$id\" $selected>$regione</option>\n";
}
/*-- ricerca provincia -*/
$query = "
SELECT `id`, `name`
FROM `#__provincia` ORDER BY `name`";
$db->setQuery($query);
$nomes = $db->loadAssocList();
$option_pro="";
foreach ( $nomes as $v ) {
$selected="";
$id = $v['id'];
$provincia = $v['name'];
if ($id==JRequest::getVar('provincia',0,'GET','INT')) {
$selected="selected='selected'";
}
$option_pro.="<option value=\"$id\" $selected>$provincia</option>\n";
}
/*-- ricerca provincia -*/
$query = "
SELECT `id`, `name`
FROM `#__comuni` WHERE `provincia_id`=".JRequest::getVar('provincia',0,'GET','INT')." ORDER BY `name`";
$db->setQuery($query);
$nomes = $db->loadAssocList();
$option_com="";
foreach ( $nomes as $v ) {
$selected="";
$id = $v['id'];
$comune = $v['name'];
if ($id==JRequest::getVar('comune',0,'GET','INT')) {
$selected="selected='selected'";}
$option_com.="<option value=\"$id\" $selected>$comune</option>\n";
}
/*-- ricerca comune -*/
$query = "
SELECT `id`, `cap`
FROM `#__localita` WHERE `comune_id`=".JRequest::getVar('comune',0,'GET','INT')." GROUP BY `cap`";
$db->setQuery($query);
$nomes = $db->loadAssocList();
$option_cap="";
foreach ( $nomes as $v ) {
$id = $v['id'];
$cap = $v['cap'];
$option_cap.="<option value=\"$id\" $selected>$cap</option>\n";
}
/*-- ricerca cap -*/
?>
<!-- fine codice php -->
<div class="form_item">
<div class="form_element cf_heading">
<h1 class="cf_text">Scheda Anagrafica </h1>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_multiholder" style="margin-left:0px!important;">
<label class="cf_label" style="display: none;">tab1</label>
<table cellspacing="0" cellpadding="0" width="95%" title="" class="multi_container">
<tbody width="100%">
<tr width="100%">
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">Cognome </label>
<input class="cf_inputbox" maxlength="40" size="10" title="" id="text_3" name="cognome" type="text" value="<?echo JRequest::getVar('cognome','','GET','STRING') ?>"/>
</div>
<div class="cfclear"> </div>
</div>
</td>
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">Nome</label>
<input class="cf_inputbox" maxlength="40" size="10" title="" id="text_5" name="nome" type="text" value="<?echo JRequest::getVar('nome','','GET','STRING') ?>"/>
</div>
<div class="cfclear"> </div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_datetimepicker">
<label class="cf_label" style="width: 80px;">Nato/a il</label>
<input class="cf_datetime" title="" size="1" id="date_34" name="date_34" type="text" value="<?echo JRequest::getVar('date_34','','GET','STRING') ?>"/>
</div>
<div class="cfclear"> </div>
</div>
<!-- disegno primo dropdown -->
<div class="form_item">
<div class="form_element cf_dropdown">
<div style="clear:both;"><label class="cf_label" style="width: 80px;" >Stato</label>
<select id="stato" name="stato" onchange="regione(this.form);" class="cf_inputbox validate-selection" ><option value="" selected="selected">Seleziona</option>
<?php echo $option_sta; ?>
</select>
</div>
</div>
<div class="cfclear"> </div>
</div>
<!-- fine disegno primo dropdown -->
<!-- disegno secondo dropdown -->
<div class="form_item">
<div class="form_element cf_dropdown">
<div style="clear:both;"><label class="cf_label">Provincia</label>
<select id="provincia" name="provincia" onchange="reload(this.form);" class="cf_inputbox validate-selection" ><option value="" selected="selected">Seleziona</option>
<?php echo $option_pro; ?>
</select>
</div>
</div>
<div class="cfclear"> </div>
</div>
<!-- fine disegno secondo dropdown -->
<!-- disegno terzo dropdown -->
<div class="form_item">
<div class="form_element cf_dropdown">
<div style="clear:both;"><label class="cf_label" style="width: 80px;">Comune</label>
<select id="comune" name="comune" onchange="reload(this.form);" class="cf_inputbox validate-selection" ><option value="" selected="selected">Seleziona</option>
<?php echo $option_com; ?>
</select>
</div>
</div>
<div class="cfclear"> </div>
</div>
<!-- fine disegno terzo dropdown -->
<!-- disegno quarto dropdown -->
<div class="form_item">
<div class="form_element cf_dropdown">
<div style="clear:both;"><label class="cf_label">cap</label>
<select id="cap" name="cap" class="cf_inputbox validate-selection" ><option value="" selected="selected">Seleziona</option>
<?php echo $option_cap; ?>
</select>
</div>
</div>
<div class="cfclear"> </div>
</div>
<!-- fine disegno quarto dropdown -->
<div class="form_item">
<div class="form_element cf_multiholder" style="margin-left:0px!important;">
<label class="cf_label" style="display: none;">tab2</label>
<table cellspacing="0" cellpadding="0" width="95%" title="" class="multi_container">
<tbody width="100%">
<tr width="100%">
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 80px;">Altezza</label>
<select class="cf_inputbox" id="select_16" size="1" title="" name="altezza">
<option value="">seleziona dalla lista</option>
<option value="150">150</option>
<option value="151">151</option>
<option value="152">152</option>
<option value="153">153</option>
<option value="154">154</option>
<option value="155">155</option>
<option value="156">156</option>
<option value="157">157</option>
<option value="158">158</option>
<option value="159">159</option>
<option value="160">160</option>
<option value="161">161</option>
<option value="162">162</option>
<option value="163">163</option>
<option value="164">164</option>
<option value="165">165</option>
<option value="166">166</option>
<option value="167">167</option>
<option value="168">168</option>
<option value="169">169</option>
<option value="170">170</option>
<option value="171">171</option>
<option value="172">172</option>
<option value="173">173</option>
<option value="174">174</option>
<option value="175">175</option>
<option value="176">176</option>
<option value="177">177</option>
<option value="178">178</option>
<option value="179">179</option>
<option value="180">180</option>
<option value="181">181</option>
<option value="182">182</option>
<option value="183">183</option>
<option value="184">184</option>
<option value="185">185</option>
<option value="186">186</option>
<option value="187">187</option>
<option value="188">188</option>
<option value="189">189</option>
<option value="190">190</option>
<option value="191">191</option>
<option value="192">192</option>
<option value="193">193</option>
<option value="194">194</option>
<option value="195">195</option>
<option value="196">196</option>
<option value="197">197</option>
<option value="198">198</option>
<option value="199">199</option>
<option value="200">200</option>
<option value="201">201</option>
<option value="202">202</option>
<option value="203">203</option>
<option value="204">204</option>
<option value="205">205</option>
<option value="206">206</option>
<option value="207">207</option>
<option value="208">208</option>
<option value="209">209</option>
<option value="210">210</option>
<option value="211">211</option>
<option value="212">212</option>
<option value="213">213</option>
<option value="214">214</option>
<option value="215">215</option>
</select>
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Altezza :: seleziona la tua altezza in cm.</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 80px;">Peso</label>
<select class="cf_inputbox" id="select_17" size="1" title="" name="peso">
<option value="">seleziona dalla lista</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>
<option value="43">43</option>
<option value="44">44</option>
<option value="45">45</option>
<option value="46">46</option>
<option value="47">47</option>
<option value="48">48</option>
<option value="49">49</option>
<option value="50">50</option>
<option value="51">51</option>
<option value="52">52</option>
<option value="53">53</option>
<option value="54">54</option>
<option value="55">55</option>
<option value="56">56</option>
<option value="57">57</option>
<option value="58">58</option>
<option value="59">59</option>
<option value="60">60</option>
<option value="61">61</option>
<option value="62">62</option>
<option value="63">63</option>
<option value="64">64</option>
<option value="65">65</option>
<option value="66">66</option>
<option value="67">67</option>
<option value="68">68</option>
<option value="69">69</option>
<option value="70">70</option>
<option value="71">71</option>
<option value="72">72</option>
<option value="73">73</option>
<option value="74">74</option>
<option value="75">75</option>
<option value="76">76</option>
<option value="77">77</option>
<option value="78">78</option>
<option value="79">79</option>
<option value="80">80</option>
<option value="81">81</option>
<option value="82">82</option>
<option value="83">83</option>
<option value="84">84</option>
<option value="85">85</option>
<option value="86">86</option>
<option value="87">87</option>
<option value="88">88</option>
<option value="89">89</option>
<option value="90">90</option>
<option value="91">91</option>
<option value="92">92</option>
<option value="93">93</option>
<option value="94">94</option>
<option value="95">95</option>
<option value="96">96</option>
<option value="97">97</option>
<option value="98">98</option>
<option value="99">99</option>
<option value="100">100</option>
<option value="101">101</option>
<option value="102">102</option>
<option value="103">103</option>
<option value="104">104</option>
<option value="105">105</option>
<option value="106">106</option>
<option value="107">107</option>
<option value="108">108</option>
<option value="109">109</option>
<option value="110">110</option>
<option value="111">111</option>
<option value="112">112</option>
<option value="113">113</option>
<option value="114">114</option>
<option value="115">115</option>
<option value="116">116</option>
<option value="117">117</option>
<option value="118">118</option>
<option value="119">119</option>
<option value="120">120</option>
<option value="121">121</option>
<option value="122">122</option>
<option value="123">123</option>
<option value="124">124</option>
<option value="125">125</option>
<option value="126">126</option>
<option value="127">127</option>
<option value="128">128</option>
<option value="129">129</option>
<option value="130">130</option>
<option value="131">131</option>
<option value="132">132</option>
<option value="133">133</option>
<option value="134">134</option>
<option value="135">135</option>
<option value="136">136</option>
<option value="137">137</option>
<option value="138">138</option>
<option value="139">139</option>
<option value="140">140</option>
<option value="141">141</option>
<option value="142">142</option>
<option value="143">143</option>
<option value="144">144</option>
<option value="145">145</option>
<option value="146">146</option>
<option value="147">147</option>
<option value="148">148</option>
<option value="149">149</option>
<option value="150">150</option>
</select>
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Peso :: seleziona il tuo peso in kg</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 80px;">Gruppo s.</label>
<select class="cf_inputbox" id="select_18" size="1" title="" name="gruppo_sangue">
<option value="">seleziona dalla lista</option>
<option value="Gruppo 0 Rh-">Gruppo 0 Rh-</option>
<option value="Gruppo 0 Rh+">Gruppo 0 Rh+</option>
<option value="Gruppo A Rh-">Gruppo A Rh-</option>
<option value="Gruppo A Rh+">Gruppo A Rh+</option>
<option value="Gruppo B Rh-">Gruppo B Rh-</option>
<option value="Gruppo B Rh+">Gruppo B Rh+</option>
<option value="Gruppo AB Rh-">Gruppo AB Rh-</option>
<option value="Gruppo AB Rh+">Gruppo AB Rh+</option>
</select>
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Gruppo s. :: seleziona il tuo gruppo sanguigno</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_multiholder" style="margin-left:0px!important;">
<label class="cf_label" style="display: none;">tab3</label>
<table cellspacing="0" cellpadding="0" width="95%" title="" class="multi_container">
<tbody width="100%">
<tr width="100%">
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Patente civile</label>
<select class="cf_inputbox" id="select_13" size="1" title="" name="select_13">
<option value="">seleziona dalla lista</option>
<option value="Nessuna">Nessuna</option>
<option value="Patente A1">Patente A1</option>
<option value="Patente A">Patente A</option>
<option value="Patente B">Patente B</option>
<option value="Patente B+E">Patente B+E</option>
<option value="Patente C">Patente C</option>
<option value="Patente C+E">Patente C+E</option>
<option value="Patente D">Patente D</option>
<option value="Patente D+E">Patente D+E</option>
</select>
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Patente civile :: seleziona il tipo di patente civile in tuo possesso</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_dropdown">
<label class="cf_label" style="width: 150px;">Eventuali abilitazioni</label>
<select class="cf_inputbox" id="select_14" size="1" title="" name="select_14">
<option value="">seleziona dalla lista</option>
<option value="nessuna">nessuna</option>
<option value="C.I.G.C.">C.I.G.C.</option>
<option value="C.A.P. KA">C.A.P. KA</option>
<option value="C.A.P. KB">C.A.P. KB</option>
<option value="C.Q.C.">C.Q.C.</option>
<option value="C.F.P.">C.F.P.</option>
<option value="A.D.R.">A.D.R.</option>
<option value="altro tipo">altro tipo</option>
</select>
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Eventuali abilitazioni :: Abilitazioni alla guida</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_multiholder" style="margin-left:0px!important;">
<label class="cf_label" style="display: none;">tab4</label>
<table cellspacing="0" cellpadding="0" width="95%" title="" class="multi_container">
<tbody width="100%">
<tr width="100%">
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">Casa</label>
<input class="cf_inputbox validate-number" maxlength="20" size="10" title="" id="text_16" name="text_16" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Casa :: numero di telefono comprensivo di prefisso</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">Ufficio</label>
<input class="cf_inputbox validate-number" maxlength="20" size="10" title="" id="text_18" name="text_18" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Ufficio :: digita il numero di telefono del posto del tuo ufficio comprensivo di prefisso</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">Cellulare 1</label>
<input class="cf_inputbox validate-number" maxlength="20" size="10" title="" id="text_19" name="text_19" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Cellulare 1 :: digita il numero del tuo cellulare personale</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">Cellulare 2</label>
<input class="cf_inputbox validate-number" maxlength="20" size="10" title="" id="text_20" name="text_20" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Cellulare 2 :: digita il numero del tuo cellulare di servizio</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">Altro</label>
<input class="cf_inputbox validate-digits" maxlength="20" size="10" title="" id="text_28" name="text_28" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Altro :: digita il numero di altri telefoni su cui rintracciarti</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_text"> <span class="cf_text">Residenza</span> </div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_multiholder" style="margin-left:0px!important;">
<label class="cf_label" style="display: none;">tab5</label>
<table cellspacing="0" cellpadding="0" width="95%" title="" class="multi_container">
<tbody width="100%">
<tr width="100%">
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">Provincia</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_23" name="text_23" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Provincia :: digita la provincia in cui si trova la tua abitazione</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">Città</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_24" name="text_24" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Città :: digita la città in cui si trova la tua abitazione</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_multiholder" style="margin-left:0px!important;">
<label class="cf_label" style="display: none;">tab6</label>
<table cellspacing="0" cellpadding="0" width="95%" title="" class="multi_container">
<tbody width="100%">
<tr width="100%">
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">Cap</label>
<input class="cf_inputbox" maxlength="5" size="10" title="" id="text_29" name="text_29" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Cap :: digita il cap della tua città</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
<td style="width: auto; vertical-align: middle; text-align: left;">
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">Indirizzo</label>
<input class="cf_inputbox required" maxlength="150" size="30" title="" id="text_22" name="text_22" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">Indirizzo :: digita l'indirizzo della tua abitazione</div>
</div>
<div class="cfclear"> </div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 80px;">@mail</label>
<input class="cf_inputbox" maxlength="150" size="30" title="" id="text_26" name="text_26" type="text" />
<a class="tooltiplink" onclick="return false;"><img height="16" border="0" width="16" class="tooltipimg" alt="" src="components/com_chronocontact/css/images/tooltip.png"/></a>
<div class="tooltipdiv">@mail :: digita un indirizzo e-mail su cui invieremo le nostre comunicazioni</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input value="Conferma" name="button_2" type="submit" /><input type="reset" name="reset" value="Reset"/>
</div>
<div class="cfclear"> </div>
</div>
------------- Java
function regione(form)
{
var sta=form.stato.options[form.stato.options.selectedIndex].value;
self.location='index.php?option=com_chronocontact&chronoformname=modulo_cri_pag_1&stato=' + sta ;
}
function comune(form)
{
var com=form.provincia.options[form.provincia.options.selectedIndex].value;
self.location='index.php?option=com_chronocontact&chronoformname=modulo_cri_pag_1&provincia=' + pro ;
}
function reload(form)
{
var cognome=form.cognome.value;
var nome=form.nome.value;
var date_34=form.date_34.value;
var cap=form.cap.options[form.cap.options.selectedIndex].value;
var com=form.comune.options[form.comune.options.selectedIndex].value;
var prov=form.provincia.options[form.provincia.options.selectedIndex].value;
var sta=form.stato.options[form.stato.options.selectedIndex].value;
self.location='index.php?option=com_chronocontact&chronoformname=modulo_cri_pag_1&comune=' + com + '&stato=' + sta + '&provincia=' + prov + '&cap=' + cap + '&cognome=' + cognome + '&nome=' + nome + '&date_34=' + date_34;
}
funziona perfettamente ma la riga dell'url diventa lunghissima.
Come posso modificarlo per passare i campi del form in campi hiden?
Mi basta un esempio per il campo hiden ed uno per il campo div dove disegno il form.
Grazie