jQuery Basics: POST/GET Data (HTTP Request)
Why Stack Overflow recommends it
Stack Overflow users link it as a worked example when they need to pass JavaScript values to a PHP page via jQuery AJAX.
Recommended by 1 people across 1 different months, 2014 to 2016.
What it is
A 14-minute 2011 screencast from Codecourse on using jQuery to send POST and GET requests to a server, showing how to post form data to a PHP script and display the response without reloading the page. It is a beginner walkthrough of jQuery AJAX basics.
What people said
Recommends ExitHelp · 2014-12 · Stack Overflow · on “I'm trying to get a Javascript Function Value into a Mysql Database”
This helped me out perfectly! I did some research on ajax and came across this video link [this video] and between the two I was able to make it work just great. Thank you!
Cites TryingHard · 2014-04 · Stack Overflow · on “How to pass variables from one php to the next using JQuery/Ajax?”
I am trying to simply just pass (or POST) a variable indicated by the user in a textbox to another .php for processing. This is my POST function in javascript. function POST() { var name = $('#name').val(); $.post('pages/searchResult.php',{name:name}, function (data) { $('#name_feedback').html(data); }); } This is how the user indicates the variable through a textbox and submit. <div id="name_feedback"></div> <div style="text-align: center"><input type="text" placeholder="Enter first or last name" name="name" id="name" class="textbox"/></div> <div style="text-align: center"><a href="main index.php?page=searchResult"><input type="Submit" value="Search" class="css_button" id="searchBtn" onclic
Cites Kyo Kusanagi · 2014-12 · Stack Overflow · on “jquery get id from url and post to page with dynamic id”
don't really understand this .. the jquery and button code i got them from this tutorial: [this video] but since i want 3 options for this vote, i didn't use the php code because it's very different of what i need.
Cites Martin Mårtensson · 2015-07 · Stack Overflow · on “How can i save the jquery click changes after click? (Serverside)”
i am trying to make a (who is here) overview page for the employees at my work. I have this .click function running now, and i gave every person an ID. fx. if i go and click to change my status then how is it possible for someone to open a browser on another computer and see that i changed the option from 'working' to 'not working'? I read that it is maby possible to do with jQuery Cookie or AJAX. Here is my code: $('.working').hide(); $('#martin .off-work').show(); //. why do i have only martin tag here? $('.oversigt').on('click', function(e) { e.preventDefault(); var t = $(this); t.hide().siblings('.oversigt').show(); }); * { font-size: 40px; } .oversigt { display: block; text-decoration:
Cites earth_gaia · 2016-06 · Stack Overflow · on “pass PHP variable from form handling generated json to javascript ajax”
@Ashok_Karale just added code in links above. I'm having trouble getting the variable from php to javascript accessible. Also I had been trying this tutorial [this video] adapted of course but nothing showed in my #results div when trying to retrieve $programmefound from extract.php