Bug Tracker

Modify

Ticket #1513 (closed bug: duplicate)

Opened 7 years ago

Last modified 7 years ago

$('<input/>').attr() failure in IE6

Reported by: uence Owned by:
Priority: minor Milestone: 1.1.2
Component: core Version: 1.1.4
Keywords: ie6 Cc:
Blocking: Blocked by:

Description

The code below fails in IE6 with the error:

"This command is unsupported."

at line 562 of jquery-latest.js v.1.1.3.1

$('<input/>')
      .attr({
            type:'submit',
            name:'cancel',
            value:'Start over',
            className:'button',
            autocomplete:'off'})

The issue seems to be with adding attributes using the method above to the INPUT element.

Change History

comment:1 Changed 7 years ago by arrix

$(document.createElement('input'))[0].type = 'submit';

works fine but

$('<input/>')[0].type = 'submit';

fails with "This command is unsupported" error.

comment:2 Changed 7 years ago by arrix

In IE, we can change the type attribute of an <input> created by document.createElement, but not one created by wrapper.innerHTML = '<input/>'.

This is an odd in IE. Should jQuery fix it?

comment:3 Changed 7 years ago by shameister

Same problem like  http://dev.jquery.com/ticket/1359

jQuery will not fix this. Documentation available at:  http://docs.jquery.com/Core#.24.28_html_.29

comment:4 Changed 7 years ago by john

  • Status changed from new to closed
  • Version changed from 1.1.3 to 1.1.4
  • Resolution set to duplicate
  • Milestone changed from 1.1.4 to 1.1.2

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.