Good morning colleagues, I am trying to get a command that shows all the files and directories of the /bin directory.
Kevin Castaño's questions
I have a problem I don't know how to convert the List<document>
to json :
public static List<Document> d() {
conexion c = new conexion();
List<Document> resultados = new ArrayList<>();
for (Document cur : c.table.find()){
resultados.add(cur);
}
return resultados;
}
Hello, I am executing action_send but the application stops. I am using android 7 and with other versions it works but with this one it stops.
String email = "[email protected]";
Intent intentMail = new Intent(Intent.ACTION_SEND, Uri.parse("mailto:"+email));
intentMail.setClassName("com.google.android.gm","com.google.android.gm.ComposeActivityGmail");
intentMail.setType("plain/text");
intentMail.putExtra(Intent.EXTRA_SUBJECT, "mails title");
intentMail.putExtra(Intent.EXTRA_TEXT, "Hi there, i love Myform app..");
intentMail.putExtra(Intent.EXTRA_EMAIL, new String[]{"[email protected]","[email protected]"});
startActivity(intentMail);
GOOD I'm trying to send an ajax array to java but it only sends me one data and I want it to send the ones I choose in the checkbox
function checkBoxElm_fav() {
var Selec = document.getElementById("Selec").value;
alert("cheked" + Selec);
$.ajax({
type: "POST",
dataType: 'text',
url: "bandeja_entrada.htm",
data: {
'Selec': Selec
},
success: function(response) {
window.location.replace("bandeja_entrada.htm");
},
});
}
function elim_fav() {
alert("entre");
checkBoxElm_fav();
var d = document.getElementById("Selec").value;
}
<a onclick="elim_fav()" name="prueba" id="prueba" title="Borrar Usuarios" class="text-left"><span class="icon"><i class="icon-trash"></i></span></a>
<table id="tb_com" class="table table-bordered ">
<thead>
<tr>
<th></th>
<th>favorito</th>
</tr>
</thead>
<tbody>
<c:forEach items="${favorito_foreach}" var="dato">
<td><input type="checkbox" name="Selec[]" id="Selec" value="${dato.idFavorito}" /></td>
<td>
<c:out value="${dato.favorito}" />
</td>
</c:forEach>
</tbody>
</table>
check box
hello I have a problem I get this error but I have checked and I don't know what it is?
<form:form method="get" commandName="dependenciascheckbox" class="form-horizontal">
<a class="text-left" action="eliminar_dependencia.htm" /> "><span class="icon"><i class="icon-trash"></i></span></a>
<c:forEach items="${depende}" var="dato">
<td>
<form:checkboxes items="true" path="isSelected" value="ON" />
</td>
<td>
<c:out value="${dato.idDependencias}" />
</td>
<td>
<c:out value="${dato.nomDependencia}" />
</td>
<td </td>
</c:forEach>
@RequestMapping(value = "eliminar_dependencia.htm", method = RequestMethod.GET)
public ModelAndView eliminar_dependencia( @ModelAttribute("dependenciascheckbox") Dependenciascheckbox d, BindingResult result, SessionStatus status, HttpServletRequest re, Model model ) throws IOException {
this.validardependependenciacheckbox.validate(d, result);
ModelAndView mav = new ModelAndView();
if (result.hasErrors()) {
if (d.getIsSelected().equals(mav) == true) {
new MetodosHql().eliminarDatos(Integer.parseInt(re.getParameter("id")), new Dependenciascheckbox(d.getIsSelected(), d.getIdDependencias()));
//System.err.println("id"+d.getIdDependencias()+"select"+d.getSelect());
mav.setViewName("redirect:/admin_roles.htm"); return mav;
}
}
return mav;
}
hello I have a problem is that I don't know how to get the selected data checkbox
outside the foreach in the part that says class="text-left" href="< value=" eliminar_dependencia.htm?id="/>"
.. it must perform the function
<div class="container-fluid">
<div class="widget-title"> <span class="icon"><i class="icon-envelope"></i></span>
<h5>Administración Dependencias</h5>
<a class="text-left" href="<c:url value=" eliminar_dependencia.htm?id="/>"><span class="icon"><i class="icon-trash"></i></span></a>
<a href="<c:url value=" nueva_dependencia.htm "/>"><span class="icon"><i class="icon-plus"></i></span></a>
</div>
<c:forEach items="${depende}" var="dato">
<tr>
<td><input type="checkbox" name="Selec" value="ON" /></td>
<td>
<c:out value="${dato.idDependencias}" />
</td>
<td>
<c:out value="${dato.nomDependencia}" />
</td>
<td <a href="<c:url value=" eliminar_dependencia.htm?id=${dato.idDependencias} "/>">Eliminar</a>
</td>
</tr>
</c:forEach>
I need to know how to call js functions because I don't know how to do it but it's different from onchange or onclick. The only documentation I have found has been for no answer to my question.
<form name="formular" action="cualquiera.html" method="post">
<select name="transporte" type="check"onclick="document.formular.enviar.disabled=!document.formular.enviar.disabled" >
<option >Coche</option>
<option >Avión</option>
<option >Tren</option>
</select>
<input type="submit" name="enviar" value="Enviar" disabled>
</form>
I want to remove field by field but it removes all the fields and blocks adding
var nextinput = 0;
function AgregarCampos() {
nextinput++;
var campo = '<div class="row"><div class="col-xs-4"><p><input type="text" class="form-control" \n\
id="campo" name="nombres" placeholder="Ingrese el nombre" /></p></div> <div class="col-xs-4"><input \n\
type="text" class="form-control" id="campo" name="valores" placeholder="Ingrese el valor" /></div>';
var removeButton = $("<input type=\"button\" class=\"remove\" value=\"-\" />");
removeButton.click(function() {
$(this).parent().remove();
});
$("#campos").append(campo);
$("#campos").append(removeButton);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<p>
<input onclick="AgregarCampos();" type="button" value="Agregar" class="btn btn-primary" />
</p>
<div id="campos">
</div>