当我包括<;脚本>;javascript代码不支持的另一个PHP文件中的标记';我不能正常工作
我已经在这个问题上纠缠了一段时间了。也许你们中的一些编程天才可以帮我 因此,我正在处理6个文件:当我包括<;脚本>;javascript代码不支持的另一个PHP文件中的标记';我不能正常工作,javascript,php,jquery,html,ajax,Javascript,Php,Jquery,Html,Ajax,我已经在这个问题上纠缠了一段时间了。也许你们中的一些编程天才可以帮我 因此,我正在处理6个文件: BASE_URL/header.php BASE_URL/footer.php BASE_URL/includes/notifications.php BASE_URL/includes/wall.php BASE_URL/javascript1.js BASE_URL/javascript2.js header.php文件包含javascript1.js的标记 php文件包含javascript2
/*---------------- popoup message notifications -----------------*/
jQuery(document).ready(function()
{/* this function will be available after the document is loaded */
/* declare the message notification variables */
var messagesIcon = $('.page_header_messages_icon');
var messagesInboxList = $('.messages_popup_box_inbox_list');
/* declare the ajaxAutoAlerts variable */
var ajaxAutoAlerts;
/* call the autoLoadMessages function */
autoLoadMessages();
messagesIcon.click(function(event)
{/* when the messagesIcon is clicked */
/* show the ajax loader */
jQuery(messagesInboxList).html("<div class='load_notifications' align='center'><img src='"+site_url+"img/ajax-loader.gif' /></div>");
var dataString = 't=alrt';
jQuery.ajax({
type: "POST",
url: site_url+"includes/message_notifications.php",
data: dataString,
cache: false,
success: function(response){
jQuery(messagesInboxList).html("");
jQuery(messagesInboxList).html(response);
/* resize nicescroll everytime an element using nicescroll is shown/hidden */
niceScrollVariable.getNiceScroll().resize();
}
});
});
});
/*--------------popoup消息通知-----------------*/
jQuery(文档).ready(函数()
{/*加载文档后,此函数将可用*/
/*声明消息通知变量*/
var messagesIcon=$('.page_header_messages_icon');
var messagesInboxList=$('.messages_popup_box_inbox_list');
/*声明ajaxAutoAlerts变量*/
var ajaxAutoAlerts;
/*调用autoadmessages函数*/
自动留言();
messagesIcon.click(函数(事件)
{/*单击消息图标时*/
/*显示ajax加载程序*/
jQuery(messagesInboxList).html(“”);
var dataString='t=alrt';
jQuery.ajax({
类型:“POST”,
url:site_url+“includes/message_notifications.php”,
数据:dataString,
cache:false,
成功:功能(响应){
jQuery(messagesInboxList).html(“”);
jQuery(messagesInboxList).html(响应);
/*每次显示/隐藏使用nicescroll的元素时调整nicescroll的大小*/
niceScrollVariable.getNiceScroll().resize();
}
});
});
});
你能告诉我们这些“错误”吗?它似乎干扰了我的其他一些javascript代码。就像当我点击弹出框的图标时,我必须多次点击它。如果javascript2.js文件似乎不起作用
,那么你应该共享这个文件。你说控制台中出现了一些错误,为了让我们帮助你,我们需要查看这些错误。我甚至没有注意到你没有共享正确的文件,其次@RishiBTW,jQuery(messagesInboxList)
应该是messagesInboxList