我正在使用QTip JQuery插件来显示弹出对话框。通过使用AJAX查询.aspx页面来加载弹出对话框。 .aspx页面只是加载一个Hyperlink控件的'NavigateUrl'属性和一个相对URL。
如果我调试.aspx页面,我可以看到服务器端代码正在将正确的相对URL加载到'NavigateUrl'属性中,但是当通过QTip呈现href标记时,URL有时会被修改(即通常已删除URL结构中的一个目录。修改似乎是完全随机的。
如果我使用“〜/ fantasy-football / nfl / free / rankingings / wide-receiver.aspx”,则会删除“nfl”部分并生成链接:“http:// site / fantasy-football /免费/排名/宽receiver.aspx“
但如果我稍微改变一下,它就可以了。例如,“〜/ fantasy-football / nfl2 / free / rankingings / wide-receiver.aspx”被正确转换为:“http://site/fantasy-football/nfl2/free/rankings/wide-receiver.aspx”
如果我在页面本身做同样的事情(不使用JQuery),地址就会正确解析。
JQuery
// Notice the use of the each method to gain access to each element individually
$('.supplementalRankSection img').each(function () {
$(this).qtip(
{
content:
{
url: 'qtipsources/suppsources.aspx',
data: { adp: $(this).parent().prev().prev().prev().attr('value'), cswr: $(this).parent().prev().prev().attr('value'), cbs: $(this).parent().prev().attr('value'), positionCode: positionCode },
method: 'get'
},
position: {
corner: {
tooltip: 'leftMiddle',
target: 'rightMiddle'
}
},
hide: { when: 'mouseout', fixed: true },
style: { name: 'mystyle', width: 165, height: 60, padding: 0 }
}); /* close qtip */
}); /* close each */
答案 0 :(得分:0)
尝试将更改网址更改为不带'〜'的值,例如:'/ fantasy-football / nfl2 / free / frankings / wide-receiver.aspx'