Closed kkaiser1952 closed 2 years ago
Hello,
This is what your json should look like:
{"D":"Letter D","E":"Letter E","F":"Letter F","G":"Letter G","selected":"selected one"}
(from https://jeditable.elabftw.net/json.php)
Here yours is in an array and doesn't have the same structure.
Please note that this library is deprecated and I'm currently focusing on https://github.com/deltablot/malle/.
Two questions if I may. One: I thought I was using a prescribed method to change the output of my MySQL into JSON. I see now it didn't do the job. Should I just manually output the data in that format instead? Two: I use jQuery in so many places I my C.R.U.D. app would there be a reasonable reason to switch to Malle?
Thanks for that info both 1 and 2. The output of MySQL now looks like this;
{"CARS and Trucks":"CARS and Trucks","PLANES including Private":"PLANES including Private","TRAINS including Subways":"TRAINS including Subways","BIKE And Motorcycles":"BIKE And Motorcycles",}
Which I do in php as; echo "$list"; but I'm missing the mechanism to move that data back to the
I'm missing the mechanism to move that data back to the for the dropdown. The example (thanks by the way) doesn't spell it out for me.
Never mind. I figured it out after many hours of trial and error I had a capital letter where I didn't want it. OH MAN!
I’d like the return from the MySQL in the <td below, the call is in the jQuery below that and PHP below that. But nothing ever shows up as a dropdown on the page. There should be 4 items, BIKES, CARS, PLANES, TRAINES. The field clears as it should but no dropdown appears, where did I go wrong?
The output looks like this;