views:

37

answers:

2

Guys,

I have this code below which works in firefox and all others except in IE. Am I making a syntaxt error somewhere? Can't seem to find it and its driving me nuts. Any help is appreciated!

$(document).ready(function(){
    $("label:contains('Number')").html("Register:");
    $("input[type='textbox']").each(function(){
        var name = $(this).attr('name'); // grab name of original
        /* create new visible input */
        var html = '<input type="checkbox" class="NetscapeFix" size="4" maxlength="5"  name="'+name+'" id="'+name+'"  value="1" dir="rtl" />';
        $(this).after(html).remove(); // add new, then remove original input
    });
});

Thank you, Kaz

A: 

on which version of IE you experienced this problem? also which version of jquery you are using?

Esse
This is more of a comment than an answer. Please use the comments functionality to keep things tidy. Thanks.
patrick dw
@patrick: 50 rep is required in order to comment, so this is why Esse posted his comment as an answer. It's wrong, but it's common amongst new users.
Andy E
@Andy - I see. Didn't realize that. Thanks for the note. :)
patrick dw
ah, sorry - my bad :)
Esse
+1  A: 

One guess is that there's no such thing as input[type="textbox"]. Perhaps you might have meant to put either input[type="text"] or textarea?

Matt Huggins