I have some Javascript that uses the createElement method to create fields on a web page.
In Internet Explorer, the fields are positioned in a pass-thru HTML table, so they are displayed correctly — in a row.
Example:
| Field 1_1 | Field 2_1 | Field 3_1 |
| Field 1_2 | Field 2_2 | Field 3_2 |
Field1_1 has on onChange event that determines what Field2_1 and Field3_1 will display. Field1_1 will also display another row of fields below in the same format — up to 15 rows — the row only appears after the onChange event is fired.
In Firefox, the fields are set corrrectly when the web page is first open. However, once the first onChange event is fired in Field1_1, the fields are not displayed as in the example above.
Example of how Firefox displays:
| Field 1_1 | (bunch of white space here) Field 2_1 | Field 3_1 |
| Field 1_2 | Field 2_2 |
| Field 3_2 |
Here is the pass-thru HTML:
[Field1_1] [Field2_1] [Field3_1] [Field1_2] [Field2_2] [Field3_2]Here is the Javascript snippet:
FilterChoices_ = [Field3_1]/[Field3_2]
var newInput = document.createElement("<Select>")
newInput.name = "FilterChoices_" + currentFilterNumber
newInput.setAttribute("id","FilterChoices_" + currentFilterNumber)
newInput.options.length = 0
newInput.options.length = lookupValues.length
newInput.multiple = false
for (x=0;x < lookupValues.length;x++){
newInput.options[x] = new Option(lookupValues[x],lookupValues[x],false,false)
};
td.appendChild(newInput);
I have been searching the web for an answer but no luck yet… Any way to control the positioning?
Any ideas would be great — really stuck on this one…
Thanks,
Dan