English 中文(简体)
如何根据请求灵活地展示表格一栏?
原标题:How make a column of table to show jsp dynamically according to request?

我有指数。

<%@ include file="header.jsp" %>

<table id="" width="100%" height="100%">
    <tr>
        <td align="left" width="30%">
            <table>
                <tr><td><a href="EmployeePage.jsp">Register employee</a></td></tr>
                <tr><td><a href="empSearch.jsp">Search employee</a></td></tr>
                <tr><td><a href="empDelete.jsp">Delete employee</a></td></tr>
            </table>
        </td>
        <td align="left" width="70%">
            <%@ include file="EmployeePage.jsp" %>
        </td>
    </tr>
</table>
<%@ include file="Footer.jsp" %>

i 雇员拥有这3项职能的所有网页。

现在我只想知道,可以将网页装入最右翼的(如果一带被装成“带”;%@包括文档=“EmployeePage.jsp” %>现在)。 由于用户点击了左拖网(登记、搜寻和删除)的链接,因此希望相应网页上装到最右侧。

IE.. i want all the contents in my index page static except that right most td to be dynamic.

究竟想要的是把我的网页,如

i 是新的主轴,因此,样本代码将非常可观。

问题回答

I could think of 2 approaches :

  1. You can use iFrames.
  2. You don t use anchor element , instead show and hide different pages using jquery or javascript and some ajax hit if required.

both of them have ample examples if you just Google.

这一样本的《质量法》应有助于你的工作。

<a href="#" onclick="loadjsp()">Register employee</a>
<div id="divId"></div>

function loadjsp(){
    $.ajaxSetup ({
        cache: false
    });
    $("#divId").load("EmployeePage.jsp");   
}

请点击<代码> 注册雇员,loadjsp(>功能,将装上jsp





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签