In the template menu I have a menu Dropdown
with the links to the other pages
application!
In the home page of the application I have the links to the other pages of the application! Ex: Home, Reports, About ... All are link's that should click on the respective pages.
To address this redirect I have added an onclik function that redirects to the appropriate pages in the <a>
tag of my base template.
The dropdown menu code looks like this:
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Serviços <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#" onclick="window.location='http://localhost:8000/cadLivro';">Cadastrar Livros</a></li>
<li><a href="#" onclick="window.location='http://localhost:8000/cadUsuario';">Cadastrar Usuários</a></li>
<li><a href="#" onclick="window.location='http://localhost:8000/cadFuncionario';">Cadastrar Funcionários</a></li>
<li class="divider"></li>
<li class="dropdown-header">Pesquisa</li>
<li><a href="#" onclick="window.location='http://localhost:8000/pesqLivro';">Livro</a></li>
<li><a href="#" onclick="window.location='http://localhost:8000/pesqUsuario';">Usuário</a></li>
<li><a href="#" onclick="window.location='http://localhost:8000/pesqFuncionario';">Funcionário</a></li>
</ul>
</li>
This is what I was able to do, since I do not have much knowledge of javascript (much less jQuery), what I did is a "gambiarra" and would only work if I were to run the application locally and at port 8000. How do I do this redirect in a correct way?!