jQuery .load()函数+ IE +动态URL =脱发 [英] jQuery .load() function + IE + dynamic URL = hair loss
问题描述
IE在jQuery加载函数中对动态URL感到困惑.
IE is having diffculty with dynamic urls in the jQuery load function.
这是我的代码段:
var formValues = $('#testing').serialize();
var URL = "test.cfm?" + formValues;
var dialogOpts = {
modal: true,
bgiframe: true,
autoOpen: true,
height: 500,
width: 500,
draggable: true,
resizable: false,
closeOnEscape: false,
open: function() {
//display correct dialog content
$("#dialogContainer").load(URL}
};
$("#dialogContainer").dialog(dialogOpts);
var formValues = $('#testing').serialize();
var URL = "test.cfm?" + formValues;
var dialogOpts = {
modal: true,
bgiframe: true,
autoOpen: true,
height: 500,
width: 500,
draggable: true,
resizable: false,
closeOnEscape: false,
open: function() {
//display correct dialog content
$("#dialogContainer").load(URL}
};
$("#dialogContainer").dialog(dialogOpts);
现在,请注意,如果我将URL更改为诸如"thisHTMLfile.html"之类的静态内容,它将在FF和IE中正常工作.但是由于URL是动态IE barfs.我得到一个空白对话框.好像IE不会进行ajax调用.
Now mind you, if I changed URL to something static like "thisHTMLfile.html", this will work flawlessly in FF and IE. But since the URL is dynamic IE barfs. I get a blank dialog. It's as if IE won't do the ajax call.
我尝试过在字符串中放置一个随机值以使其成为唯一的url的想法,以便IE不会缓存该URL,没有骰子.
i've tried the idea of putting a random value in the string to make it a unique url so that IE won't cache the url, no dice.
我还检查了test2.cfm文件是否存在HTML错误.没问题.
I've also checked the test2.cfm file for any HTML errors. No problems here.
有人遇到过吗?
谢谢!
推荐答案
@ Karim79:是的,这会让我搞砸,但这只是我在此处键入的内容.不过在我的代码上是正确的.
@Karim79: yes that would screw me up, but that was just me typing into the screen here. It is correct on my code though.
我确实找出了问题所在.我的Coldfusion本地主机的内部调试设置为ON.它向我显示了为该页面运行的所有代码和过程.我认为这种多余的代码使IE成为了Barf.所以我关闭了调试输出,瞧.我的IE 6头痛再见了:)
I did figure out the issue. My Coldfusion localhost has internal debugging set to ON. It shows me all the code and processes that ran for the page. I think this extra code spew was making IE barf. So I turned off debugging output and voila. My IE 6 headaches went bye bye :)
这篇关于jQuery .load()函数+ IE +动态URL =脱发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!