Function that recharges the page after another function

Asked

Viewed 20 times

0

Well I have a select that executes an onclick function when selecting a select option, it returns to a function called gotoRefresh, which executes a select in the database to bring data on the grid according to what was selected in select.

The problem is, every time you run this, it does everything correctly, only it does not reload the page... then it will only show the changes if I give a F5... how can I change to reload automatically ?

My select:

<select name='FAZ1' id='FAZ1' type='text' style="display:inline"
lang='Faz1,N'
onchange='Javascript:return gotoRefreshOrderBy();'>

    <struts_logic:iterate id="arrhh_empresa" name="collhh_empresa" scope="page" type="java.util.ArrayList">
            <option value='<%=arrhh_empresa.get(0).toString()%>'
                                    <%=arrhh_empresa.get(0).toString().equals(strEmpresaUserSelecionada) ? "selected" : ""%> >
                                    <%=arrhh_empresa.get(1).toString()%>
            </option>
    </struts_logic:iterate>

</select>

My gotoRefresh function:

function gotoRefreshOrderBy(){
    document.FrmTelaBranca.action='<%=request.getContextPath()%>/list_webcbvcadastros.do';
    goList();
}

Screenshot with the menu and also the url that inserts this eventName when you do the function, does anyone know why he inserts this eventName into the URL ? I wouldn’t want you to show up either

Botão que da a função onclick e o evento que adiciona na url quando executa a função

1 answer

-1

function goList(){

        document.FrmTelaBranca.submit();
        window.setTimeout(function () {
        // Redireciona para a pagina
        location.href = "list_wmsbdotpequipamentos.do";
    }, 5000);
    }

I did so, if I take out the white Document.Frmtelawhite, it redirects after 5 seconds to the page, but I need the Submit for it to give the event, but if I leave the Document it does nothing

Browser other questions tagged

You are not signed in. Login or sign up in order to post.