Results 1 to 2 of 2


  1. #1

    Default combining both function help needed?

    function showUser25(str1)
    {
    if (str1=="")
    {
    document.getElementById("words").innerHTML="";
    return;
    }
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("words").innerHTML=xmlhttp .responseText;
    }
    }
    xmlhttp.open("GET","wordCount.php?p="+str1,true);
    xmlhttp.send();
    }
    function showUser26(str1)
    {
    if (str1=="")
    {
    document.getElementById("orderprice").innerHTML="" ;
    return;
    }
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
    xmlhttp=new XMLHttpRequest();
    }
    else
    {// code for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange=function()
    {
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("orderprice").innerHTML=xm lhttp.responseText;
    }
    }
    xmlhttp.open("GET","wordCalculate.php?p="+str1,tru e);
    xmlhttp.send();
    }


    I want to combine both these functions please help so that i can call only one function at onchange or onKeyUp

  2. Default

    The same can be said for the range of a combined function; the new function will be based on the restriction(s) of the original functions.


Similar Threads

  1. Min Function in MS EXCEL
    By keirawtsn in forum Computer Forum
    Replies: 0
    Last Post: 05-05-2013, 20:39 PM
  2. Replies: 0
    Last Post: 05-05-2013, 20:36 PM
  3. What is the function of traffic?
    By bread1 in forum Parking & Traffic Monetization
    Replies: 0
    Last Post: 11-22-2012, 08:48 AM
  4. Combining social networks
    By austinhendry182 in forum Traffic Forum
    Replies: 2
    Last Post: 05-09-2011, 03:34 AM
  5. PHP: Why use a @ before a function ?
    By alexrubin in forum Programming
    Replies: 1
    Last Post: 07-08-2008, 03:57 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
| UKC | VPS Germany | Webmaster Marketplace | Web Hosting Forum | Domain Name Forum | VPS Forum | Webmaster Forum | Website Design Forum | Sites For Sale |