0 Users appreciate this thread.
How to use $.post (JavaScript)
angelrulez7 (2014-01-27 04:30:15)Don't use this, though. It's really not useful when PHP can do all the work.
a
(Capt.)Orb (2014-01-28 17:45:17)I completely agree with Ar7.
Aviation fact: The a380 is the largest commerical aircraft in service!
Go to Splashiverse! Splashiverse
Go to Splashiverse! Splashiverse
CoolApps (2014-04-20 14:18:25)Don't use Javascript to do the job, it won't be good at all at the end.
User can disable JavaScript and they can most likely get an issue on their side.
So again, DON'T use JavaScript for this.
Newer account: NodePoint
Log in to submit a comment
Back to forum: Web Programming (HTML, JS, CSS, PHP, MySQL)
New registered users today: 7
Newest registered user: ElegantVulpes
first, you have to have something in your document containing text, or something that has value.
example:
<input type="text" id="text">
then, ofcourse you can enter text in it, then, grab the text in it with JS:
var mytext = document.getElementById("text"
(the id of the input field is "text"
then, you can use the $.post method. the $.post method is usually used to send data to another file for handling that data:
$.post('yourfile.php', {text: text});
// yourfile.php is where the data is going
then, put your PHP in that file for handling the text.
(say like some MySQL querys) you may also make the $.post method tell you when the data was sent to the file:
$.post('yourfile.php', {text: text}, function() {
//your code here
});
2014-01-24 14:33:55
^ Click
(This Image was created from cooltext.com)