884 Topics
![]() | |
I am doing one survey form.In that i am selecting the radio buttons and if i click the save button means it is creating.I have checked by using json.But my requirment is to save the radio button option in database. | |
Hi all, I am newish to Ajax, I've used it in the past in very rare circumstances and I understand for the most part how ajax works to combine client side and server side by sending information off to the server and displaying returned information from whereever it sent it's … | |
I have a query on session storage how to store three fields value in a single session storage. I have three fields two radio button (in different groups) and one drop down in the first page this is how my first will look like. I was not able to get … | |
Hi all, my understanding was that Nginx doesn't do any caching unless you tell it to. However, for some reason, all my filles are being cached, and so the website doesn't respond to change in css or js files etc. I thought that the below server{} code would help: location … | |
I am have debugging some javascript code in firebug,then i have seen some strange POST thing in firebug this is worrying me? I have registration form when i reload page i see in firebug following "POST http://api.adsrun.net/post" Response Header Cache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Connection keep-alive Content-Type application/json Date … | |
I want to parse json to html, with angularjs, i am converting an xml rss feed to json with npm xml2json I am using angularjs http to get an xml from the server, i am using node module xml2json to convert it to a json object. I get the document … | |
Hello, I have this code to print all locations from a json file: countries.json: { "af": { "name": "Afghanistan", "phoneCode": "93" }, "al": { "name": "Albania", "phoneCode": "355" }, "dz": { "name": "Algeria", "phoneCode": "213" }, "ad": { "name": "Andorra", "phoneCode": "376" } } Jquery: function getData() { $.ajax({ url: … | |
I have be writing code for Json requests, but haven't seen this before.. How do I go about it? I want to return all the countries with their name and Phonecode Here is the Json am getting request from: data.json: { "af": { "name": "Afghanistan", "phoneCode": "93" }, "al": { … ![]() | |
Hi there, I want to make rest api in codeigniter .Already have created backend for web app.I need to fetch json data from third party(Request Response).Can you give me the idea how to integrate rest api in backend? | |
Getting an unexpected error don't know what the hell is wrong as everything is perfect as far as I noticed Parse error: syntax error, unexpected '=' in C:\wamp\www\dropbox-sdk\index.php on line 18 <?php session_start(); require_once "lib/Dropbox/autoload.php"; $_SESSION["user_id"] = 1; $dropboxKey = ''; $dropboxSecret = ''; $appName = 'puttiapp/1.0'; $appInfo = new … ![]() | |
I have a software which demands this extensions on server , i tried by using xampp but failed. In the beginning it demands zend Guard Loader . I have tried to install on xampp but it can't be installed. I have already read this topic and follow and many topics … ![]() | |
Hello recently I downloaded dropbox SDK and Ii's located in my downloads folder and it's dragging me to hell how do we install it no proper description provided nor a good details so we would be able to install it can anyone help me out there is no code to … | |
Although objects collections have a place in the PHP world many years now , their use is now flourishing because more and more PHP programmers turn to OOP. This tutorial is a sequel of https://www.daniweb.com/programming/web-development/tutorials/500118/a-simple-data-layer-for-oop-php-applications (we will refer to it as “previous tutorial”) and https://www.daniweb.com/programming/web-development/tutorials/500118/a-simple-data-layer-for-oop-php-applications , in order to understand … | |
Dear Daniweb friends, I created adapter like this: public class PromotionAdapter { String code = null; String name = null; String continent = null; String region = null; public PromotionAdapter(String code, String name, String continent, String region) { super(); this.code = code; this.name = name; this.continent = continent; this.region = … | |
Hi I am currently developing a mobile / tablet application and i've run into a stump. I have a webview that loads a form from a website that i have no control over, this website utilises the django platform. So the situation is this: The form on the foreign website … | |
Hello, This tutorial is the next of “[A simple Data Layer for OOP PHP Applications](https://www.daniweb.com/programming/web-development/tutorials/500118/a-simple-data-layer-for-oop-php-applications)” so having read it and made your own tests is needed to understanding what we are doing. So far we have a Db object (child of PDO that standardize and simplifies its use) , a … | |
Hello, I have this code here. I am trying to show the different options with radio box. There is something wrong in my code, however I can't figure out what it is. Any help? <div id="questions"> <p><img src="images/pic_survey.jpg" width="279" height="104" alt=""/></p> <p>Please take our five second survey!</p> <h3 class="hSubtitle">Question 1</h3> … | |
Hi. When trying to pass a parameter to the mehod I get error: not found I've been trying other url syntaxes (@url.action) but to no avail also. script inside input/index view <script> $(document).ready(function () { $("#btnSubmit").click(function () { var presc1 = $('#p1').val(); $.ajax({ type: "POST", dataType: "json", contentType: "application/json; charset=utf-8", … | |
Hi all. I cannot pass the values from the textboxes onm a form to the controller. view code <script type="text/javascript"> $(document).ready(function () { $("#btnSubmit").click(function () { var presc1 = $('#p1').val(), aviad1 = $('#a1').val(), $.ajax({ type: "POST", dataType: "json", contentType: "application/json; charset=utf-8", url: "comparar", data: "{'presc1':'" + presc1 + "', 'aviad1':'" … | |
Hi all, My project is on ruby on rails. I have one of ruby api returns json.jbuilder But I want that my api should not return json , it will display html.erb file Is anybody can help me??? | |
A simple Data Layer for OOP PHP Applications Hello, first of all to understand this tutorial would be best if you have some knowledges about OOP ( https://www.daniweb.com/programming/web-development/tutorials/437592/introduction-to-phps-object-orientation by priteas ) and DB usage (MySQL in this case) with PHP https://www.daniweb.com/programming/web-development/threads/499320/common-issues-with-mysql-and-php by diafol ). What we will try to achieve … | |
I need to get user manipulated data out of my WinJS listview and convert it to JSON, but I can't figure how to access the data? Any help would be appreciated! | |
Hey guys, I'm very new to this so please forgive me. I have a theme that I am trying to use to display some stats from my minecraft server (Yes I am one of those people :) ) The dashboard theme has a load of charts that are in a … | |
Hi, I have created real time script for my website. I wanted to ask u is it good or bad script? Here is my script: My php page:servr.php <?php set_time_limit(0); $con = mysqli_connect('localhost','root','') or die ("Could not connect to the Database"); mysqli_select_db($con,"msg") or die("Cannot find the database"); $last_id=null; while(1) { … | |
i have a URL like this example.com/index.php?param1=10,20,30,40,50¶m2=50,60,70,80,90,10¶m3=40,50,60,70,80 Using PHP,javascript,JSON i did this pentagon radarchart. If the values are changing then the pentegon image also will be change. and if the parameters limit is 3 only. if it is 1 parameter then the respective parameter values will display. By using the … | |
Why my $last_id variable is null always ? i am using this scirpt for ajax..but i tried to excute without my ajax page,it works fine and the output give me `{"data_from_file":"ghjghj","timestamp":1441695735,"msg_id":"1190","reciver_id":"12","sender_id":"10"}` when i want to check my $last_id variable that was null, <?php set_time_limit(0); $con = mysqli_connect('localhost','root','') or die ("Could … | |
I'm looking for some ideas on a direction to take on a project. I have a software package that I want to develop. When I discussed the software with a potential customer, the first question I got was does it run on a mac? The second question was does it … | |
Dear all, I have a very strange problem I cant seem to make sense of. Here is the story... I created a product page which when visited performs an ajax request to a json file to obtain product data, I then have a js script while dynamically appends html to … ![]() | |
Hello i am trying to user Autocomplete jqueryUI but i having trouble showing data from my database. I pretty sure that the problem lies there. Here is the code <?php define('DB_SERVER', 'localhost'); define('DB_USERNAME', 'root'); define('DB_PASSWORD', ''); define('DB_DATABASE', 'project'); $db = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD,DB_DATABASE) or die(mysqli_connect_error()); mysqli_query ($db,"set character_set_results='utf8'"); // if … | |
I have a JSON decoded array in php with foreach that includes a select option in a form every time I select an option from this drop down it returns the last value in the list. The option is just the selector not the value I'm trying to save. I'm … | |
![]() | So I currently have a bot in mIRC, but I want to develop a bot in C#. I am trying to figure out how to parse JSON in C#. My goal is to get recent followers and check for followers(this is where json comes in) and add a points system. … |
i will be receiving JSON POST as mentioned on this web page https://sendgrid.com/blog/sendgrids-parse-api-parsing-incoming-email-is-now-faster-and-easier/ how do my application receive this request and process furthur?? | |
I am using jQuery and prototype libarary fro this project. I have this code so far: HTML: <div id="cnt"></div> <input type ="text" id="bla" name="tct"/> Javascript: if(e.keycode == 13){ var text = document.getElementById('#bla'); text= $('#bla').val(); //text.evaljson(); //I put a comment because it gives me error "badly formed json string" $('#cnt').append(text); } … ![]() | |
I am trying to filter/parse HTML tags mentioned below to get the desired output (mentioned). I have tried so far with `sed` & `grep` but was only able to extract the content between the starting and closing tags. However, I want to be more specific like below I have mentioned. … | |
I made an API request using AJAX request, I received JSON, I tried my best to use JavaScript to parse it, but to no avail. Instead I used jQuery which made it as painless as 2 lines of code. Now I have JSON array translated into array-ish object in JavaScript. … | |
Hi All, I am using php to create a Webservice API calls. I am checking all the service calls in Chrome's Postman and sending the data in JSON format. I want to upload an image in JSON format with other datas.Actually I have converted the image to base64 before uploading.Its … | |
I am newbie in ajax.i want to send a normal ajax request when i will click the search button.i write some code the search onclick function.. $(document).ready(function() { $("#Search").click(function() { $.ajax({ "dataType": 'json', "type": "POST", "url": "../test/loginform_details.do", "data": { username: $('#username').val().toString(), password: $('#password').val().toString(), }, "success": function(data) { fnCallback(data); } }); … | |
Hello, I want to ask, what going on for this. I try to implement form, user key in the username, it will trigger the function to check the username is existing or not. I tried to figure out the problem, but dont know what's going on... My Js file, jQuery(document).ready(function() … ![]() | |
![]() | For my angular controller I have: app.controller('AdminCtrl', function ($scope, $http) { $scope.data = { Name: '', Password: '' }, $scope.login = function (data) { $http({ method: 'POST', url: '/login/postlogin', data: JSON.stringify({ data: $scope.data }), contentType: "application/json", dataType: "json" }).success(function (data) { alert('success!'); }).error(function (error) { alert(error.message); }) } }); For … ![]() |
I have this function: function (Blobs) { console.log(JSON.stringify(Blobs)); // Make the progress bar here Blobs.forEach(function(Blob) { console.log(Blob); $.post(window.location.href + '/add', Blob); // Increment the progress bar by the correct amount, once above request has completed }); } (This function is passed as an argument, hence no name) I want a … | |
Hi. Below is the code which parse data from mysql into json, but for the name column i want to have <a href="http://example.com">column name</a> instead of jst the column 'name'. is it possible in any ways. <?php $link = mysql_pconnect("localhost", "user", "pass") or die("Could not connect"); mysql_select_db("userdb") or die("Could not … ![]() | |
I'm saving data with the help of ajax and laravel. In the form the text field data is saving but the file is not saving with the help of ajax. This is my script. <script> $(document).ready(function() { $('#ajax').submit(function(event){ event.preventDefault(); $.ajax({ type: 'POST', url: 'post_contact', data: $('form#ajax').serialize(), dataType: 'json', }) .done(function(data) … | |
I newbie in JSON Programming . I have scratched to much youtube and also google about the retrieve of data into string json using C# windows form application .. I haven't found anything till now. Please give a example and step by step procedure of how to retrieve the data … ![]() | |
I'm building an API and on the aspect of sending a mail. I'm getting mail not sent error. In my API, the front-end sends a JSON request consisting of the mail parameters. { "to":"gideonappoh@gmail.com", "subject":"Testing Reviewer's Page", "body": "Hello Gideon", "headers":"oksana.v@scopicsoftware.com" } I then decode them and pass them through … | |
My code is working for the Agents, Labs and Investigator's grid, but when I add the last grid 'Vaccines', the grid does not display. According to firebug there is a "TypeError:W.localdata is undefined" It seems to be a problem with my orders3 data, but I can't figure out what. Can … | |
Hi, My name is jai and I am trying to code a contact form in php all is going well but I am unable to get data in my email which I am filling in this form please help me. my php code is below <?php header('Content-type: application/json'); $status = … | |
Hello all, I have a function in JS, that I need to translate in Java to be used in my JSP as part of server side script. I need to find out what's the equavalent of JSON.stringify() in Java? This is my current JS function. This functioin takes a CSV … | |
I am currently attempting to work on converting a fairly sizeable JSON object and convert it into a CSV format. However, when I attempt to do so, using a conventional approach (that seems to work with other files). I am presented with a "ValueError: too many values to unpack" I … | |
Please someone help. I want to put the $url which is created into $shorturl = to generate a custom url ($url actually outputs a http://something.com actual link) but don't know how. or can you help me put the $url in header("Location:" ## .$url ## ']); to redirect users to the … | |
Good Afternoon: I would like to have this JSON object written out to a CSV file so that the keys are header fields (for each of the columns) and the values are values that are associated with each header field. Is there a best practice for working with this? Ideally … |
The End.