Hello I am updating a web page, in which I have a form, the necessary data are filled in and with javascript, at the moment of sending the form, it does not open or does not detect the link well.
At the moment of clicking on the edit button, the link of the page that I need to open is not opened correctly.
The browser bar appears:
link $ user% 20?% 3E
In case everything went well, the browser bar should show:
The error I think is in this line
document.autform.action = "EditarPruebaFrames.php?usuario=<?php echo $usuario ?>";
function EditarPrueba(){
var select_prueba = document.getElementById("prueba");
var prueba = select_prueba.value;
if ((prueba == "") || (prueba == null))
alert("No ha seleccionado ninguna prueba");
else
{
document.autform.action = "EditarPruebaFrames.php?usuario=<?php echo $usuario ?>";
document.autform.method = "POST";
document.autform.submit();
document.autform.action = "";
/*
document.getElementById("autform").action = "EditarPruebaFrames.php?usuario=<?php echo $usuario; ?>";
document.getElementById("autform").method = "POST";
document.getElementById("autform").submit();
document.getElementById("autform").action = "";*/
}
}
<form class = "form-horizontal" name="autform" id="autform" action="<?php $_SERVER['PHP_SELF']?>" method="post" target="EDICION">
<!--
Código del que se obtiene la "prueba"
-->
<input class="btn btn-primary" type="button" name="Editar" id="Editar" value="Editar" class="normal_text" onClick= "EditarPrueba();">
</form>
Any way to redirect the php file correctly?
thanks.