Bug Tracker

Opened 12 years ago

Closed 12 years ago

#2669 closed bug (invalid)

.submit() does not post value of name attribute

Reported by: asa_carter Owned by:
Priority: minor Milestone: 1.2.4
Component: event Version: 1.2.3
Keywords: button, name, value Cc:
Blocked by: Blocking:

Description

I'm pretty sure that the name and value attributes of a button element are supported in html, which I guess means that there is a bug in .submit()

http://www.argyllnewmedia.co.uk/kintyreportal/test.php

<? $but = $_POSTbut?; $sub = $_POSTsub?; ?> <!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script type="text/javascript" src="script/jquery-1.2.3.pack.js"></script> <script type="text/javascript"> $().ready(function() {

$("#but").click(function() {

$("#testForm").submit();

});

}); </script> </head> <body> <? echo "button result: " . $but; echo "submit result: " . $sub; ?> <form id="testForm" action="test.php" method="post"> <input type="button" id="but" name="but" value="button" /> <input type="submit" id="sub" name="sub" value="submit" /> </form> </body> </html>

Change History (1)

comment:1 Changed 12 years ago by flesler

Component: coreevent
Milestone: 1.2.31.2.4
Resolution: invalid
Status: newclosed

jQuery is doing nothing but trigger the native submit event. Thus, if the name isn't posted, it shouldn't be an issue related to jQuery.

Reopen if you have something else to add.

Note: See TracTickets for help on using tickets.