make sure submit button name/value is submitted with form values. Fixes #551

This commit is contained in:
scottjehl 2010-11-29 10:09:26 -05:00
parent 891c09b32a
commit 419787affe
2 changed files with 2 additions and 8 deletions

View file

@ -32,8 +32,7 @@
<option value="Overnight shipping">Overnight</option>
</select>
</div>
<button type="submit" data-theme="a">Submit</button>
<button type="submit" data-theme="a" name="submit" value="submit-value">Submit</button>
</fieldset>
</form>

View file

@ -33,12 +33,7 @@ $.widget( "mobile.button", $.mobile.widget, {
.insertBefore( $el )
.click(function(){
if(!o.disabled){
if( type == "submit" ){
$(this).closest('form').submit();
}
else{
$el.click();
}
$el.click();
}
return false;