开发者

textarea not displaying IE but is getting submitted

i have the following function in jQuery and javascript that creates a form element:

createEmail: function(title){
        var $emailForm = $('<form>',{action: 'sendEmail.php', id: 'emailForm'});
        var $table = $('<table>');

        $emailForm.append($table);
        var $tr = $('<tr>');
        $tr.append($('<td>',{text: 'Email From:'}));
        $tr.append($('<td>',{html: '<input type="text" value="" name="from"/>'}));
        $table.append($tr);

        $tr = $('<tr>');
        $tr.append($('<td>',{text: 'Email To:'}));
        $tr.append($('<td>',{html: '<input type="text" value="" name="to"/>'}));
        $table.append($tr);

        $tr = $('<tr>');
        $tr.append($('<td>',{text: 'Message Body:'}));
        $tr.append($('<textArea>',{name: 'msg', cols: 50, rows: 10,
                            text: 'Attached is the ' +title+ ' license key file.\nPlease place the file in the same directory as the "check_license.php" file for ' +title+ ' '}));
        $table.append($tr);

        $tr.append('<input type="hidden" value="'+title+'" name="title"/>');

        var $div = $('<div>').append($emailForm).dialog({
                title: 'Email ' + title + ' File',
                width: 600,
                modal: true,
                buttons: {
                    cancel: function(){
                        $(this).dialog('close');
                    },
                    send: function(){
                        $.post($emailForm.attr('action'), $emailForm.serialize(),function(data){
                            alert(data);
                            $div.dialog('close');
                        })
    开发者_如何转开发                }
                },
                beforeClose: function(){
                    $(this).remove();
                }
            });
        $div.dialog('widget').css('margin','0 auto');

    }

For some reason in IE the text area is not showing up and the dialog looks like this when you click on it:

textarea not displaying IE but is getting submitted

but in chrome and FF it looks normal:

textarea not displaying IE but is getting submitted

why is this happening? the text area still gets submitted to my php as if it has something in it (and when i use dev tools in IE8 it says there is content in it)

So why in IE does it not display an editable textarea?

Thanks....


If I'm reading correctly, it looks like you're appending your textarea to the row instead of the cell.


Perhaps IE is not recognizing the <textArea>, try <textarea>.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜