Javascript jQTouch动态Web应用程序?
我正在开发一个动态变化的web应用程序。我正在使用javascript和jQuery用Javascript jQTouch动态Web应用程序?,javascript,ajax,debugging,jqtouch,iphone,Javascript,Ajax,Debugging,Jqtouch,Iphone,我正在开发一个动态变化的web应用程序。我正在使用javascript和jQuery用和 AllaccessMD 你确定吗? 家 AllaccessMD 加载。。。 AllaccessMD 加载。。。 Javascript文件: function setupHome(){ if(localStorage.role == "Specialist"){ var homeUL = '<li class="arrow"><a id="aEP" rel="s,' + loca
和
AllaccessMD
你确定吗?
家
AllaccessMD
加载。。。
AllaccessMD
加载。。。
Javascript文件:
function setupHome(){
if(localStorage.role == "Specialist"){
var homeUL = '<li class="arrow"><a id="aEP" rel="s,' + localStorage.userID + '" href="#ePresentations">My E-Presentation</a></li>'
+ '<li class="arrow"><a id="aN" rel="s,' + localStorage.userID + '" href="#date">My Newsletter</a></li>'
+ '<li class="arrow"><a id="aE" rel="s,' + localStorage.userID + '" href="#date">My Events</a></li>'
+ '<li class="arrow"><a id="aMP" rel="s,' + localStorage.userID + '" href="#date">Medical Partners</a></li>'
+ '<li class="arrow"><a id="aS" rel="s,' + localStorage.userID + '" href="#date">Search</a></li>'
+ '<li class="arrow"><a id="aP" rel="s,' + localStorage.userID + '" href="#date">Profile</a></li>';
$('#ulHome').html(homeUL);
} else {
var homeUL = '<li class="arrow"><a id="aMP" rel="m,' + localStorage.userID + '" href="#date">Medical Partners</a></li>'
+ '<li class="arrow"><a id="aS" rel="m,' + localStorage.userID + '" href="#date">Search</a></li>'
+ '<li class="arrow"><a id="aP" rel="m,' + localStorage.userID + '" href="#date">Profile</a></li>';
$('#ulHome').html(homeUL);
}
$('#ePresentations').bind('pageAnimationStart', function (e){setupEPresentations(getID($('#aEP').attr('rel')).id);});
}
function setupEPresentations(sID){
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
var epObject = JSON.parse(xmlhttp.responseText);
var html = '<h1>Dr. ' + epObject.DR.DATA[0][1] + ' E-Presentation\'s</h1>';
if(epObject.EP.DATA.length == 0){
html += '<div><p>There are currently no E-Presentation\'s for this doctor.</p></div>';
} else {
html += '<ul class="edgetoedge">';
for(var i in epObject.EP.DATA){
html += '<li class="arrow"><a id="' + epObject.EP.DATA[i][0] + '" href="#ePresentationDetails">' + epObject.EP.DATA[i][1] + '</a></li>';
}
html += '</ul>';
}
$('#ePresentationsData').html(html);
$('#ePresentationsData li a').click(function(e) {alert('what');setupEPresentationDetails(this.id);});
}
}
xmlhttp.open("GET","Lib/ePresentations.cfm?Type=getAllEPsID&sID=" + sID,true);
xmlhttp.send();
}
function setupEPresentationDetails(id){
/*xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
var epObject = JSON.parse(xmlhttp.responseText);
var html = '<h1>Dr. ' + epObject.DATA[0][0] + ' E-Presentation</h1>';
html += '<p>';
//html += '<br />' + epObject.DATA[0][2].format("mmmm dd, yyyy");
html += '<br /><strong>Rating:</strong> ' + Math.ceil(epObject.DATA[0][4]) + ' / 5 (' + epObject.DATA[0][5] + ' votes cast)';
html += '<br /><br /><a rel="external" href="http://www.youtube.com/v/' + epObject.DATA[0][3] + '">Click here to view E-Presentation</a>';
html += '</p>';
$('#ePresentationDetailsData').html(html);
}
}
xmlhttp.open("GET","Lib/ePresentations.cfm?Type=getEP&id=" + id,true);
xmlhttp.send();*/
$('#ePresentationDetailsData').html('I dont get called?');
}
函数setupHome(){
if(localStorage.role==“专家”){
var homeUL=''
+“”
+“”
+“”
+“”
+“”;
$('ulHome').html(homeUL);
}否则{
var homeUL=''
+“”
+“”;
$('ulHome').html(homeUL);
}
$('#ePresentations').bind('pageAnimationStart',function(e){setupEPresentations(getID($('#aEP').attr('rel')).id);});
}
功能设置表示(sID){
xmlhttp.onreadystatechange=函数(){
if(xmlhttp.readyState==4&&xmlhttp.status==200){
var epObject=JSON.parse(xmlhttp.responseText);
var html='Dr.+epObject.Dr.DATA[0][1]+'E-Presentation's';
if(epObject.EP.DATA.length==0){
html+='目前没有针对这位医生的电子演示文稿。';
}否则{
html+='';
for(epObject.EP.DATA中的变量i){
html+=';
}
html+='
';
}
$('#ePresentationsData').html(html);
$(#ePresentationsData li a')。单击(函数(e){alert('what');setupEPresentationDetails(this.id);});
}
}
open(“GET”、“Lib/ePresentations.cfm?Type=getAllEPsID&sID=“+sID,true”);
xmlhttp.send();
}
函数设置PresentationDetails(id){
/*xmlhttp.onreadystatechange=函数(){
if(xmlhttp.readyState==4&&xmlhttp.status==200){
var epObject=JSON.parse(xmlhttp.responseText);
var html='Dr.+epObject.DATA[0][0]+'E-Presentation';
html+='';
//html+='
'+epObject.DATA[0][2]。格式(“mmmm-dd,yyyy”);
html+='
评级:'+Math.ceil(epObject.DATA[0][4])+/5('+epObject.DATA[0][5]+'vows cast');
html+='
';
html+='';
$('#ePresentationDetailsData').html(html);
}
}
open(“GET”、“Lib/ePresentations.cfm?Type=getEP&id=“+id,true”);
xmlhttp.send()*/
$('ePresentationDetailsData').html('I not call?');
}
我做错了什么?也许有更好的办法
谢谢 您使用的是什么版本的JQT?
您是否将整个应用程序包装在
中?
您是否使用Safari developer模式查看了它,以了解呈现HREF时列表的实际内容
我将查看以下内容的渲染HREF:
<li class="arrow"><a id="aS" rel="m,' + localStorage.userID + '" href="#date">Search</a></li>
确保html是它应该是的。rel=或未转义的引号可能会将其丢弃。但我看不出有任何明显的迹象表明你做错了
你有一个链接可以发送给我,这样我就可以调试它的行动
<li class="arrow"><a id="aS" rel="m,' + localStorage.userID + '" href="#date">Search</a></li>