xernt.com




Xernt helps you find up-to-date answers & allows to take a part in building human knowledge database.
This Post below ↓ is only visible to you.
It is sheduled to delete with all the changelog & comment data attached. You can cancel deletion at any time.
4 weeks left
TIP. Editing item cancels the deletion shedule automatically.
Ajax post jquery, ajax get jquery

Ajax post jquery, ajax get jqueryEdit

 
 
HTTP ajax post jquery, ajax get jquery without reloading the page. Working example and everything explained.
Before you start you need to have included in your code: JQUERY library in your </HEAD> section of your document.



or just upload it on your server.

  1. First you need to build your php content like it would work without ajax

    it could be a php script or just a simple request.

    go.php

    // actions (like adding record to db)
    echo 'THANKS!'.die;

    ?>

  2. Then you put code inside .html script file

    it could be index.html


  3. You put LINK which you want to "launch action" (the script you've supplied in 2. point [in bold you need to edit])

    Love it!

    in bold is parameter which would go to go.php?value=love (see it?)

  4. Finally you place where the message (or action) needs to be printed (echo "") on your webpage

    you put:



ALL! It works. If you've got any questions please ask. I've tried to make it as simple as possible, thanks.

Does anybody needs a working example? (.rar, .zip package?) Edit
Comment · pm1  · 1 year ago
<AndyPSV> if you want to use it more than 1 time on subpage, you need to change class name: function _getX
(ex. function _get1(....), _get2(....) etc. cheers – Andrzej Jeziorski  2 months ago · Reply
Please login or create an account to post a comment.
Follow Post
Related Posts
1,590 views


 
 
87 online
About · Blog · Explore · Privacy · Terms · Help  up

These items will be permanently deleted and cannot be recovered. Are you sure?