mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
make sure submit button name/value is submitted with form values. Fixes #551
This commit is contained in:
parent
891c09b32a
commit
419787affe
2 changed files with 2 additions and 8 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue