Bug Tracker

Ticket #5503: test.html

File test.html, 1.7 KB (added by jonliss, 13 years ago)

test case illustrates failure

Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<?xml version="1.0" encoding="UTF-8"?>
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4<head>
5        <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
6        <script type="text/javascript">
7<!--
8function checkFoo() {
9        var choice = $('input[name="foo[0]"]:checked').val();
10        alert("foo[0] choice is " + choice);
11}
12function checkBarBaz() {
13        var choice = $('input[name="bar.baz[0]"]:checked').val();
14        alert("bar.baz[0] choice is " + choice);
15}
16function checkFeeFoe() {
17        var choice = $('input[name="fee.foe"]:checked').val();
18        alert("fee.foe choice is " + choice);
19}
20-->
21</script>
22</head>
23<body>
24<h1>foo[0]</h1>
25<form>
26        <input type="radio" name="foo[0]" id="test_1_1" checked="checked" value="1" /><label for="test_1_1">Yes</label>
27        <input type="radio" name="foo[0]" id="test_1_2" value="2" /><label for="test_1_2">No</label>
28        <input type="button" value="Test" onClick="checkFoo();" />
29</form>
30<h1>bar.baz[0] - why does this not work?</h1>
31<form>
32        <input type="radio" name="bar.baz[0]" id="test_2_1" checked="checked" value="1" /><label for="test_2_1">Yes</label>
33        <input type="radio" name="bar.baz[0]" id="test_2_2" value="2" /><label for="test_2_2">No</label>
34        <input type="button" value="Test" onClick="checkBarBaz();" />
35</form>
36<h1>fee.foe</h1>
37<form>
38        <input type="radio" name="fee.foe" id="test_3_1" checked="checked" value="1" /><label for="test_3_1">Yes</label>
39        <input type="radio" name="fee.foe" id="test_3_2" value="2" /><label for="test_3_2">No</label>
40        <input type="button" value="Test" onClick="checkFeeFoe();" />
41</form>
42</body>
43</html>