Skip to main content

Bug Tracker

Side navigation

#2669 closed bug (invalid)

Opened April 09, 2008 12:43PM UTC

Closed May 11, 2008 10:15PM UTC

.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 = $_POST["but"];

$sub = $_POST["sub"];

?>

<!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>

Attachments (0)
Change History (1)

Changed May 11, 2008 10:15PM UTC by flesler comment:1

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.