Bug Tracker

Modify

Ticket #2669 (closed bug: invalid)

Opened 5 years ago

Last modified 5 years ago

.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:
Blocking: Blocked by:

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

comment:1 Changed 5 years ago by flesler

  • Status changed from new to closed
  • Resolution set to invalid
  • Component changed from core to event
  • Milestone changed from 1.2.3 to 1.2.4

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.