我正在使用grails來開發我的應用程序和'原型'庫來做一個AJAX調用,其中 我在IE上遇到問題。在所有其他瀏覽器中,我的應用程序工作正常 這裏是我的代碼:grails IE ajax問題
<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字符串中包含這使得在Firefox,Chrome和Safari,但不是IE的罰款無序列表的HTML這似乎沒有得到整個列表有時或獲得一些空的列表時間。這種行爲完全不可預測,取決於IE的情緒。
有沒有人遇到過這個問題?我該如何解決這個問題?
感謝
Possigle重複http://stackoverflow.com/questions/5997857/grails-best-way-to-send-cache-headers-with-every-ajax-call –