Syntax or bug problem?

1

I'm using onclick to execute a JavaScript when a button is clicked on the dropdown-menu.

The problem is in view :

Fullimagecodeabove:

/*Linha1*/<divid="context-menu4">
    /*Linha 2*/ <ul class="dropdown-menu" role="menu">
        /*Linha 3*/ <li style="cursor:pointer" onclick="ApagarImagem4()"><a tabindex="-1">Apagar</a></li>
        /*Linha 4*/ <li style="cursor:pointer" onclick="location.href='@Url.Action("DownloadImagem", "Account", new {imagem = "Image4" })'"><a tabindex="-1">Baixar imagem</a></li>
        /*Linha 5*/ <li><a tabindex="-1">Something else here</a></li>
        /*Linha 6*/ <li class="divider"></li>
        /*Linha 7*/ <li><a tabindex="-1">Separated link</a></li>
    /*Linha 8*/ </ul>
/*Linha 9*/ </div>

JavaScript code:

function ApagarImagem4(){

    $.ajax({
        url: '/Account/Apagar_Imagem4',
        type: 'POST',
        data: { imagem :"Imagem4" },
        success: function (response) {
            if (response.Success)
            { alert("Sucesso")}

        }
    });
}

It looks like you did not like parenthesis "Delete Picture4 ()". The problem was on line 3.

In the error list, it shows a yellow warning:

Then, when you restart Visual Studio, the warning disappears. Sometimes when I say run, it shows this warning.

Any solution?

    
asked by anonymous 22.11.2016 / 20:17

0 answers