On 16/11/06, Sam Collett <[EMAIL PROTECTED]> wrote:
> On 16/11/06, Klaus Hartl <[EMAIL PROTECTED]> wrote:
> > Sam Collett schrieb:
> > > Test case:
> > > $(
> > > function()
> > > {
> > > var action = $("<input type=hidden>").attr(
> > > {
> > > "name": "action",
> > > "value": "delete"
> > > });
> > > alert(action[0].name); // name seems to be added fine
> > > alert($("<form>").append(action).html()); // where has name
> > > gone?
> > > }
> > >
> > > )
> > >
> > > The first alert shows that name has been set, but when I get the html
> > > it is not there. Happens in 1.0.3 (and did in 1.0.2)
> >
> > To name a field "action" is not a good idea anyway. It clashes with the
> > form elements own action attribute (form.action anyone?), so maybe
> > that's also the reason why it is gone...
> >
> >
> > -- Klaus
>
> It happens regardless of the name you give it:
>
> $(
> function()
> {
> var action = $("<input type=hidden>").attr(
> {
> "name": "whatdodo",
> "value": "delete"
> });
> alert(action[0].name); // name seems to be added fine
> alert($("<form>").append(action).html()); // where has name
> gone?
> }
>
> )
>
> It is only a problem in IE.
>
I've tried it on several machines in IE 6 as well as 7 and it is still
an issue. Can anyone replicate this with their copies of IE?
Filed it as a bug otherwise I may have to resort to doing things the
old fashioned way document.write(<form name='...'
action='...'><input.....
http://jquery.com/dev/bugs/bug/408/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/