Onchange提交表单-需要帮助 [英] Onchange submit form - need help
本文介绍了Onchange提交表单-需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我具有以下表单,并且想要松开提交按钮,将其自动化以进行onchange提交..
Hi,
I have the following form and want to loose the submit button, automate it to onchange submit..
<td width="1000" align="right">
<div class="form_content">
<form name="newad" method="post" action="/newad.php?step=1">
<label>{""}<span class="mandatory"></span></label><br><br>
<select id="category" name="category">
<option value="">{"Novo anúncio, seleccione uma categoria.."}</option>
{foreach from=$categories item=v name=cat}
{if $v.parent==1}
<optgroup label="{$v.str}{$v.name}">
{else}
<option value="{$v.id}" {if $tmp.category==$v.id}selected="selected"{/if}>{$v.str}{$v.name|escape:"html"}</option>
{if ( $smarty.foreach.cat.index!=$categories|@count-1 && $v.parent_id!=$categories[$smarty.foreach.cat.iteration].parent_id) || ($smarty.foreach.cat.index==($categories|@count-1) && $v.parent_id!=0)}
</optgroup>
{/if}
{/if}
{/foreach}
</select>
<div class="buttons">
<button type="submit" name="Choose_categ" class="positive">
{"Criar anúncio"}
</button>
</div>
</br>
</br>
</div>
</td>
</pre>
Can anyone help me please, thanx in advance.</br></br></div>
推荐答案
类别item = v name = cat} {if
categories item=v name=cat} {if
v.parent == 1} < optgroup =" {
v.parent==1} <optgroup label="{
v. str} {
这篇关于Onchange提交表单-需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文