InvalidCharacterError only in IE

We have an order form in which the ziplookup function is used, when zipcode is entered in the field, then the city, county, state and zip code are entered in the same field.

<tr> <td class="formLabel" id="<%=prefix%>.ZipCodeLookup.label">Zip Code</td> <td class="formColon">:&nbsp;</td> <td class="formData"> <div id="zipOutput"></div> <input type="hidden" id="<%=prefix%>.city" name="<%=prefix%>.city" value="<%=City%>" /> <input type="hidden" id="<%=prefix%>.county" name="<%=prefix%>.county" value="<%=County %>" /> <input type="hidden" id="<%=prefix%>.state" name="<%=prefix%>.state" value="<%=State%>" /> <input type="hidden" id="<%=prefix%>.zip" name="<%=prefix%>.zip" value="<%=Zip %>" /> </td> </tr> 

The error is only in IE:

lib.functions.dom.createInput // type = text name = shipping.ZipCodeLookup id = shipping.ZipCodeLookup // InvalidCharacterError

lib.objects.window.LookupWidget.createInputField () // Unable to set property value 'w90> or null reference

+6
source share
1 answer

The problem here is probably that you are using the period in the id and name fields of your HTML. IE seems to consider this to be invalid HTML. Most browsers are more forgiving than IE for such a violation. Also note that many frameworks allow for automatic shielding.

If you remove the period from these fields, everything should work if all the characters in the prefix variable are valid for use in these fields.

+6
source

All Articles