Browser detection for expanding width SELECT column, IE not working right.(JS & HTML)

Hey all,

If you go to that site on Firefox, the “Return Code #” expands. But if you use IE, you’ll see that it doesn’t.

I could add a fix in there for the fields if they were static, but if you see my javascript, they are dynamically loading fields.

This “class”:“wide” is not working:

invoiceInput.appendChild(createElement("input", {"type":"text", "name":"invoice[]", "size":"8", "class":"wide;"}));

I am using a script I found on a jQuery board (, and it works for them, but not for me because my syntax is probably wrong. And they also are just using 1 field and not near-unlimited dynamically loading fields like I am.

How would I add in a fix to have the browser ‘only’ use the expansion if the user is using IE6 or IE7?

I searched on the boards but couldn’t find the solution to this problem. Thanks in advance!

It seems like a IE-specific conditional comment may be your friend here.

Using a [url="
]downlevel-hidden one means that nothing gets to see the code inside the comment, unless it’s IE and matches the condition.

For example:

<!--[if (gte IE6) & (lte IE7)]>
<script src="fixie6and7.js"></script>