Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3404920
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:26:31+00:00 2026-05-18T05:26:31+00:00

I have a simple page with a table and i want it to be

  • 0

I have a simple page with a table and i want it to be sortable, so i got jquery and tablesorter. Heres my page:

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" type="text/css" href="/css/base.css"/>
    <script src="/javascript/jquery-1.4.3.js" type="text/javascript"></script>
    <script src="/javascript/jquery.tablesorter.js" type="text/javascript"></script>
    <title>JSP Page</title>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#tabela").tableSorter();
        });
    </script>
</head>

<body>        
    <p>
        <label><h3>Lista de Personagens</h3></label>
    </p>
    <p>
        <a href="inserir.htm">Novo Personagem</a>
    </p>
    <table id="tabela" border="1" cellspacing="0" cellpadding="0">
        <tr>
            <th>Codigo</th>
            <th>Nome</th>
            <th>Classe</th>
            <th colspan="3">Opções</th>
        </tr>
        <c:forEach items="${lista}" var="p">
            <tr>
                <td>${p.id}</td>
                <td>${p.nome}</td>
                <td>${p.classe}</td>
            <form id="formAlterar${p.id}" method="get" action="alterar.htm">
                <td>
                    <input type="hidden" name="id" value="${p.id}" />
                    <a href="#" onclick="document.getElementById('formAlterar${p.id}').submit()">Alterar</a>
                </td>
            </form>
            <form id="formConsultar${p.id}" method="post" action="consultar.htm">
                <td>
                    <input type="hidden" name="id" value="${p.id}" />
                    <a href="#" onclick="document.getElementById('formConsultar${p.id}').submit()">Consultar</a>
                </td>
            </form>
            <form id="formExcluir${p.id}" method="post" action="excluir.htm">
                <td>
                    <input type="hidden" name="id" value="${p.id}" />
                    <a href="#" onclick="document.getElementById('formExcluir${p.id}').submit()">Excluir</a>
                </td>
            </form>
        </tr>
    </c:forEach>
</table>

I have the javascript folder at the same level as WEB-INF. I think i pointed to the right place. but when i load the page, nothing happens, the table statys fixed, no sorting. Can it be related to the fact im using Spring MVC and the mapping makes it point to the wrong location? Heres my mapped method:

@RequestMapping("/personagem/index.htm")
public ModelAndView listar(@RequestParam(value = "mensagem", required = false) String mensagem) {
    ArrayList<Personagem> lista = getPersonagemService().listarTodos();
    return new ModelAndView("listar", "lista", lista);
}

Edit: The generated HTML code (it’s a bit long, so i cut off the repeating part):

 <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
    <link rel="stylesheet" type="text/css" href="/css/base.css"/> 
    <script src="/javascript/jquery-1.4.3.js" type="text/javascript"></script> 
    <script src="/javascript/jquery.tablesorter.js" type="text/javascript"></script> 
    <title>JSP Page</title> 
    <script type="text/javascript"> 
        $(document).ready(function() {
            $("#tabela").tableSorter();
        });
    </script> 
</head> 

<body>        
    <p> 
        <label><h3>Lista de Personagens</h3></label> 
    </p> 
    <p> 
        <a href="inserir.htm">Novo Personagem</a> 
    </p> 
    <table id="tabela" border="1" cellspacing="0" cellpadding="0"> 
        <tr> 
            <th align="center">Nome</th> 
            <th align="center">Classe</th> 
            <th width="250" colspan="3">Opções</th> 
        </tr> 

            <tr> 
                <td width="150" align="center">Melys</td> 
                <td width="150" align="center">Priest</td> 
            <form id="formAlterar4" method="get" action="alterar.htm"> 
                <td align="center"> 
                    <input type="hidden" name="id" value="4" /> 
                    <a href="#" onclick="document.getElementById('formAlterar4').submit()">Alterar</a> 
                </td> 
            </form> 
            <form id="formConsultar4" method="post" action="consultar.htm"> 
                <td align="center"> 
                    <input type="hidden" name="id" value="4" /> 
                    <a href="#" onclick="document.getElementById('formConsultar4').submit()">Consultar</a> 
                </td> 
            </form> 
            <form id="formExcluir4" method="post" action="excluir.htm"> 
                <td align="center"> 
                    <input type="hidden" name="id" value="4" /> 
                    <a href="#" onclick="document.getElementById('formExcluir4').submit()">Excluir</a> 
                </td> 
            </form> 
        </tr> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T05:26:32+00:00Added an answer on May 18, 2026 at 5:26 am

    Have you confirmed that the following resources are served properly? (e.g., they aren’t 404, they are the correct content type, etc.)

    • /css/base.css
    • /javascript/jquery-1.4.3.js
    • /javascript/jquery.tablesorter.js

    If so, have you used something like the Firefox Error Console to ensure that there are no JavaScript errors in your code?

    Also, why are you embedding forms in your table that appear to just link to a page with an id? In other words, why not just link to the page?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple HTML Table (10 columns x 500 rows). When the page
I have simple HTML page with svg like this: <div id=plan> <svg xmlns=http://www.w3.org/2000/svg version=1.1>
I have a simple lift page: <html> <head></head> <body> <span id=content class=lift:GetContent></span> </body> </html>
I have a simple table, with a head and a body. Now I want
I have a simple html page containing a large table with more than 2000
I am simply learing Ajax with jQuery and have a simple page method that
I have a simple table for reference page: id name description image In reference.php,
I got a really simple table structure like this: Table Page Hits id |
I have a page with a table, and I want its layout to look
We have a simple table with employee data containing a 100k records. We want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.