InvalidCharacterError在IE中只 [英] InvalidCharacterError in IE only
问题描述
我们有一个使用时进入一个领域一个zip code的ziplookup特征的订单,市,县,州和邮编,然后进入同一领域。
We have an order form that uses a ziplookup feature for when a zipcode is entered into a field, the city, county, state and zip are then entered into the same field.
<tr>
<td class="formLabel" id="<%=prefix%>.ZipCodeLookup.label">Zip Code</td>
<td class="formColon">: </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>
在IE错误不仅是:
The error on IE only is:
lib.functions.dom.createInput //类型=文本名称= shipping.Zip codeLookup ID = shipping.Zip codeLookup // InvalidCharacterError
lib.functions.dom.createInput// type=text name=shipping.ZipCodeLookup id=shipping.ZipCodeLookup // InvalidCharacterError
lib.objects.window.LookupWidget.createInputField()//无法设置的未定义或为空引用属性价值
lib.objects.window.LookupWidget.createInputField() // Unable to set property 'value' of undefined or null reference
推荐答案
这里的问题可能是您正在使用的 ID一段
和你的HTML的名称
字段。 IE浏览器似乎认为是无效的HTML。大多数浏览器比IE更宽容对于这种侵犯。还要注意的是很多框架允许它通过自动转义。
The problem here is probably that you are using a period in the id
and name
fields of your HTML. IE seems to think that is not valid HTML. Most browsers are more forgiving than IE for this kind of violation. Also note that many frameworks allow it through automatic escaping.
如果您从这些领域中删除期,一切都应该工作,提供所有的字符在preFIX变量是有效的在这些领域中使用。
If you remove the period from those fields, everything should work, provided all of the characters in your prefix variable are valid for use in these fields.
这篇关于InvalidCharacterError在IE中只的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!