Questions tagged as 'json'

1
answer

Use database data mysql and php

This code works correctly with the fixed dates. How do I use the dates that are registered in the mysql database? if (!empty($_REQUEST['year']) && !empty($_REQUEST['month'])) { $dates = array( array( 'date' => '2016-09-1...
asked by 21.09.2016 / 16:37
1
answer

How to code json with multiple objects in PHP

I need the following result: { "sala": [{ "horario": "18:30", "data": "Seg e Terça" }, { "horario": "10:30", "data": "Quarta Terça" }] }         UPDATE    I'm doing this in PHP:...
asked by 25.08.2016 / 14:09
1
answer

Problems with function when trying to perform deletion

I have a problem deleting it and I get an error message in the console, my script looks like this: <form action="" id="frmDeleta" class="smart-form"> <button type="submit" class="btn btn-danger"> Excluir </button> <in...
asked by 14.10.2016 / 14:53
1
answer

How to send data from a form generated by the Ionic Framework to a PHP file and return a JSON?

I've been following the Ionic Framework documentation and viewing tutorials on the internet, but there's no detail communicating with the server. I would like to send form data and receive information via JSON. Could you post a simple example...
asked by 26.10.2016 / 14:20
1
answer

JavaScript src link

Good, I have the following code, in a function Javascript , function(){ var noDataIcon = document.createElement("img"); noDataIcon.src = "~/Images/delete_database.png"; } It happens to give me an error in src, can n...
asked by 08.08.2016 / 18:05
1
answer

Json Post Unsupported Media Type Spring MVC

I am doing POST using ajax data in JSON format to controller in Spring MVC , however the server is refusing such request Unsupported Media Type stating that the type is not supported. Is there a configura...
asked by 26.07.2016 / 22:44
1
answer

insert array foreach

I have a problem with entering data in the database with php, I have a form with several checkboxes, so I want to select more than 1 checkbox and insert it into the database, so I did form <input type="checkbox" name="f_carteira[]" value...
asked by 17.07.2016 / 18:59
1
answer

NHibernate is modifying property when returning by Web Api

I have a web service api where a query is made to the database through nhibernate, but when returning the object, its referenced properties are overwritten, I believe it's because of the nhibernate proxy. HowcanIbedoingtofixthisproblem?Follo...
asked by 21.07.2016 / 16:15
2
answers

Access function object and use it anywhere

I made a request from a json file and passed it to a function. $.post('principal/json',minhaCallBack,'json'); //Requisição function minhaCallBack(returnhtml){ //função var json = returnhtml; console.log('json', json); return json; };...
asked by 20.06.2016 / 15:33
1
answer

Spring / Jackson Json - Problem in deserialize

This question is a follow-up to another question, a user answered found the solution to my other question ( Spring Custom Json Receive ), but I'm now having trouble mapping using Jackson. I want to receive a custom request in JSON and send a...
asked by 01.07.2016 / 22:09