I have a button (MODIFY) that when you press it puts in an input type = text the input value of a form.
It does fine with normal numbers , but not with numbers 1B: 3B: 3B: 4B: 5B: 6B or with 1C-3C-3C-4C-5B -6B
It does not even enter the javascript function to say alert ("hello");
but if they are numbers "80" - "5" it does well.
@foreach($datos_usuario as $value)
<tr>
<form action="Borrar_mac" id="idformac_usu" name="formac_usu" method="POST" >
{!! csrf_field(); !!}
<td><input type="text" name="txtdireccion_mac" readonly="readonly" value="{!! $value->Direccion_mac !!}" readonly></td>
<td><input type="text" name="txt_descripcion" readonly="readonly" value="{!! $value->Descripcion !!}" readonly></td>
<td><input type="text" name="txtfecha" readonly="readonly" value=" {!! $value->Fecha !!} " readonly></td>
AQUÍ---> <td><input type="button" name="modificar" onclick="cambiarMac({!! $value -> Direccion_mac !!})" value="Modificar Mac" ></td>
<td><input type="submit" name="btn_borrar" value="Borrar Mac"></td>
</form>
</tr>
@endforeach
</table>
<!-- Modificar -->
<div id='formulario_cambio_mac'>
<form action='cambiar_datos_mac' id="idform_cambiar" method='POST'>
</form>
</div>
Javascript
function cambiarMac(mac){
alert("entro");
var txt1 = '{!! csrf_field(); !!}';
txt1 += "<input type='hidden' name='identificador_mac' id='id_identificadormac' value=''>";
txt1 += "<label for='nueva_mac'>Modifica la Mac <input type='text' name='nuevatxtmac' id='id_cambiar_mac' value='' onblur='comprobar_formato_mac(this,mod);' required></label><br/>";
txt1 += "<label for='nueva_descripcion'>Escribe la Descripcion <input type='text' name='txtdescripcion' id='iddescripcion' value='' required></label><br/>";
txt1 += "<input type='submit' name='btn_enviar' value='Cambiar Mac'>";
txt1 += "<input type='button' name='btn_no_hacer' onclick='No_realizar();' value='No realizar'>";
document.getElementById("idform_cambiar").innerHTML = txt1;
document.getElementById('id_identificadormac').value = mac;
document.getElementById('id_cambiar_mac').value = mac;
}