我一直试图让它工作很长时间,尝试了大量的 SO 问题/答案,但没有走得太远。
我想我最初有两个问题,希望我已经解决了一个。
我一直在使用 JotForm(使用原型的简单表单创建器)。我拥有的是一个 facebook 样式菜单 ( AjaxFlagMenu ),它创建了一个 verticle ajax 样式菜单,该菜单从外部文件中提取 html 片段(在我的例子中,它们都有一个 Jotform 表单)。
目前在包含菜单的“主”页面顶部,我有:
<script src="http://cdn.jquerytools.org/1.2.5/jquery.tools.min.js"></script>
<script type="text/javascript" src="/js/jquery.corner.js"></script>
<script type="text/javascript" src="/js/jquery.flagmenu.js"></script>
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($){
var Menu = $("#_Menu").AjaxFlagMenu({
Caption:'Manage Profile',
CaptionClass:'CaptionClass',
onOutClass:'onOutClass',
onOverClass:'onOverClass',
onClickClass:'onClickClass',
hscOutClass:'hscOutClass',
hscClickClass:'hscClickClass',
Loading_gif:'/images/loading.gif',
ajaxContent:'ajaxContent'
});
//Basic
Menu.add({
Title:'Basic Info',
onOutIcon:'/images/icon-vcard-c.png',
onClickIcon:'/images/icon-vcard-d.png',
HtmlSatusContent:'',
url:'/instructor/pages/mp-basic.php',
data:''
});
//Profile Picture
Menu.add({
Title:'Profile Picture',
onOutIcon:'/images/icon-camera-c.png',
onClickIcon:'/images/icon-camera-d.png',
HtmlSatusContent:'',
url:'/instructor/pages/mp-photo.php',
data:''
});
//Pricing and Offers
Menu.add({
Title:'Pricing and Offers',
onOutIcon:'/images/icon-pound-c.png',
onClickIcon:'/images/icon-pound-d.png',
HtmlSatusContent:'',
url:'/instructor/pages/mp-pricing.php',
data:''
});
//Services
Menu.add({
Title:'Services',
onOutIcon:'/images/icon-services-c.png',
onClickIcon:'/images/icon-services-d.png',
HtmlSatusContent:'',
url:'/instructor/pages/mp-services.php',
data:''
});
//Bio and Additional
Menu.add({
Title:'Bio and Additional',
onOutIcon:'/images/icon-bio-c.png',
onClickIcon:'/images/icon-bio-d.png',
HtmlSatusContent:'',
url:'/instructor/pages/mp-bio.php',
data:''
});
$("#_td").corner("4px");
});
</script>
<script src="/js/jotform/prototype.js?v=3.1.92" type="text/javascript"></script>
<script src="/js/jotform/protoplus.js?v=3.1.92" type="text/javascript"></script>
<script src="/js/jotform/protoplus-ui.js?v=3.1.92" type="text/javascript"></script>
<script src="/js/jotform/jotform.js?v=3.1.92" type="text/javascript"></script>
<script src="/js/jotform/calendarview.js?v=3.1.92" type="text/javascript"></script>
然后我需要做的是,当单击菜单项并从其他页面加载 HTML 时,我需要运行JotForm.init();
以启用 JotForm 验证功能。但是,我什至似乎无法alert("Hello World");
在被调用的页面上工作。
任何帮助都会很棒!谢谢!