Bug 47407
| Summary: | html5 progress element is not scriptable or javascript not working | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Jim Michaels <jmichae3> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Major | CC: | ap |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| URL: | http://JesusnJim.com/common/html5.html | ||
Jim Michaels
webkit 534.3 google chrome. tried the following in an html5 document. it didn't do anything to the progress control.
<form>
<progress id="pg" value="30" max="100" style="width:300px;color:#0f0;">the progress control is not supported by this browser.</progress>
<select id="s" onChange="switch()">
<option value="0">0%</option>
<option value="10">10%</option>
<option value="20">20%</option>
<option value="30">30%</option>
<option value="40">40%</option>
<option value="50">50%</option>
<option value="60">60%</option>
<option value="70">70%</option>
<option value="80">80%</option>
<option value="90">90%</option>
<option value="100">100%</option>
</select>
<script type="text/javascript">
function switch() {
var pg=document.getElementById('pg');
var s=document.getElementById('s');
pg.value=parseInt(s.options[s.selectedIndex].text);
}
</script>
</form>
in fact, I can't seem to get javascript to work on chrome yet. more testing.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
> function switch() {
"switch" is a keyword in JavaScript, no wonder this doesn't parse. Please use Web Inspector console to find mistakes like this.