Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have the following form and want to loose the submit button, automate it to onchange submit..


XML
<td width="1000" align="right">
<div class="form_content">
<form name="newad" method="post" action="/newad.php?step=1">
	<label>{""}</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>
Posted
Updated 25-Nov-11 18:01pm
v3
Comments
[no name] 23-Nov-11 18:18pm    
Format code snippets when posting

1 solution

I know it's "cool" to do this, but it is contrary to best practices for accessiblity.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900