I have the following Javascript function to manage the edit of a field on a bootstrap modal web page. It works fine with Chrome but Edge does a page reload after completion which closes the modal.
Any thoughts on why this is happening? Suggestions to stop it?
Any thoughts on why this is happening? Suggestions to stop it?
Code:
function edit(element) { if (document.getElementById(element + "-glyph").className == "glyphicon glyphicon-pencil") { document.getElementById(element).readOnly = false; document.getElementById(element + "-glyph-remove").style.visibility = "visible"; document.getElementById(element + "-can").style.visibility = "visible"; document.getElementById(element + "-glyph").className = "glyphicon glyphicon-ok"; document.getElementById(element + "-glyph").title = "save?"; document.getElementById(element).focus(); return true; } }
Comment