I can't find any question similar to what I'm looking for, that is why I'm asking here.
The problem is very simple, since I do not have so much experience with js. I would like to solve this simple problem.
I have the follow JS Code
function valida()
{
    if (document.getElementById('contrato').value=='0')
    {
        alert('O contrato do cliente deve ser selecionado!');
        document.getElementById('contrato').focus();
        return false
    }
    if (document.getElementById('problema').value=='0')
    {
        alert('A tipo da ocorrência deve ser selecionado!');
        document.getElementById('problema').focus();
        return false
    }
    if (document.getElementById('descricao').value=='')
    {
        alert('A descrição do problema deve ser preenchido!');
        document.getElementById('descricao').focus();
        return false
    }
}
function mostra()
{
    if (document.getElementById("sumula").style.display != "none")
    {
        document.getElementById("sumula").style.display = "none";
    }
    else
    {
        document.getElementById("sumula").style.display = "block";
    }
}
Actually the above piece of code is in my HTML interface and work properly. But now I need to restructure my interface and separate it in 7 other small interfaces (No problem at this point).
Then I will have 7 distinct new interfaces, and I do not want to repeat the JS code as above, then I had created a new js file called protocol.js and I will include the protocol.js in all my 7 new interfaces.
I'm including like this ->
<script language="javascript" type="text/javascript" src="scripts/protocol.js">
but it is not working. Just this not work. When I back the whole code in my HTML it works fine, I had try absolute path, relative path and nothing.
What could it be? Any help?
 
     
     
    