Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
K

Kaivan Alimohammadi

@Kaivan Alimohammadi
About
Posts
1
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Intitialize a session variable after onclick event is fired
    K Kaivan Alimohammadi

    u can use ajax. u must create a function in your javascript code that send ajax request to your php file and get response from that.

    function getXMLHttpRequest()
    {
    if (window.XMLHttpRequest) {
    return new window.XMLHttpRequest;
    }
    else {
    try {
    return new ActiveXObject("MSXML2.XMLHTTP.3.0");
    }
    catch(ex) {
    return null;
    }
    }
    }

    function do_somting(){
    xhr= getXMLHttpRequest();
    xhr.onreadystatechange=function()
    {

            if(xhr.readyState==4 && xhr.status==200)
            {
                //get response here from php file with xhr.responseText;
                
            }
        }
        xhr.open("GET","file.php",true);
        xhr.send(null); 
    

    }

    and in php file that contains php functions.

    Linux, Apache, MySQL, PHP php com tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups