【发布时间】:2011-10-12 20:53:08
【问题描述】:
我正在使用 grails 开发我的应用程序和“原型”库来执行 AJAX 调用 我在 IE 上遇到问题。在所有其他浏览器中,我的应用程序运行良好。 这是我的代码:
<html>
<g:form action="ajaxcall" id="recform">
<g:select id="aseselect" name="art" from="${dropdownList}" optionKey="id" optionValue="value" noSelection="['':'- Select -']"/>
<g:submitToRemote action="ajaxcall" value="submit" update="updatediv" />
</g:form>
<div id="updatediv"></div>
</div>
</html>
这是我的控制器代码:
def ajaxcall = {
String toRender="";
//code that makes db call and adds html into the toRender string
render toRender;
}
'toRender' 字符串包含无序列表的 html,它在 Firefox、chrome 和 safari 中呈现良好,但在 IE 中不呈现,它有时似乎无法获取整个列表或有时会得到一个空列表。根据 IE 的情绪,这种行为是完全不可预测的。
以前有人遇到过这个问题吗?我该如何解决这个问题?
谢谢
【问题讨论】:
标签: ajax internet-explorer grails prototypejs