Javascript Anchor Tag and Url Redirecting to MVC action.

  • Thread starter Thread starter Adry 2018
  • Start date Start date
A

Adry 2018

Guest
Hi Team

<div id="div1" class="dd" style="display:none;">

<a href="@Url.Action("Index", "Test")" onclick="return open1();" title="Test" class="links" id="tstLink">

</div>

Is it possible to change the style for div1 to display block before redirecting to MVC action.

As it is not working.after redirection div1 showing display none only.

function open1() {

document.getElementById("div1").style.display = "inline-block";

//window.location = "Test/Index";

}

Continue reading...
 
Back
Top