简体   繁体   English

如何在一个HTML页面上打开多个表单?

[英]How do I open multiple forms on a single HTML page?

I have a single Bootstrap HTML page that is a repository for a large number of forms (quizzes). 我有一个Bootstrap HTML页面,该页面是大量表单(测验)的存储库。 Currently I have the quizzes opening in a bootstrap modal via iFrame, but the lag on the initial load of the repository page is bad (too many calls to the server for the iFrames). 当前,我通过iFrame在引导程序模式中打开了测验,但是存储库页面的初始负载上的滞后很糟糕(对于iFrame,对服务器的调用太多)。

This is for work so the server is Oracle (no php), and the systems are still all XP using IE8. 这是为了工作,因此服务器是Oracle(无php),并且系统仍然都是使用IE8的XP。

The iFrames work but they lag the page. iFrame可以运行,但是滞后页面。 How do I go about opening multiple versions of this form without leaving the page? 如何在不离开页面的情况下打开此表格的多个版本?

Quizzes follow this format: http://techlaboratory.net/techlab/demos/SmartWizard2/ 测验遵循以下格式: http : //techlaboratory.net/techlab/demos/SmartWizard2/


Based on the Ajax suggestion I tried to mimic the example I found but I must be missing something. 基于Ajax的建议,我试图模仿我发现的示例,但是我肯定缺少一些东西。

<html>
<head>
<title>ajax test</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<script>
function showUrlInDialog(url){
   var tag = $("<div></div>");
      $.ajax({
         url: url,
           success: function(data) {
              tag.html(data).dialog({modal: true}).dialog('open');
                }
                   });
                    } 

</script>
</head>

<body>

<a href="#" onclick="showUrlInDialog('../../quiz_all/match.html'); return false;">Match quiz</a> 


</body>
</html>

I would turn it into an Ajax UI where you fetch your quizzes through ajax calls and insert them into the DOM directly. 我将其转换为Ajax UI,您可以在其中通过ajax调用获取测验并将其直接插入DOM。 This means you can get by with a single page application and no iframes 这意味着您可以使用一个页面应用程序而无需iframe

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM