SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2010
    Location
    Bangladesh
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post Ajax onchange request

    Hello,

    I need a suggestion about ajax response request.

    Suppose, I have a select box and onchange function which call AJAX XMLHttpRequest function. Now my question is if i use onchange function and additionally i pass parameter which is not from Onchange to AJAX XMLHttpRequest, is it possible? If possible then how?

    Thanks,
    RIma.

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,313
    Mentioned
    178 Post(s)
    Tagged
    8 Thread(s)
    Hi there,

    I'm afraid I don't quite understand your question.

    Quote Originally Posted by Rima_dhk View Post
    if i use onchange function and additionally i pass parameter which is not from Onchange to AJAX XMLHttpRequest, is it possible?
    In it's basic form, an AJAX request looks something like this:

    Code:
    var r = new XMLHttpRequest(); 
    r.open("POST", "webservice", true);
    r.onreadystatechange = function () {
    	if (r.readyState != 4 || r.status != 200) return; 
    	console.log(r.responseText);
    };
    r.send("a=1&b=2&c=3");
    So what do you want to pass from where to where?
    It would be helpful to see some code.


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
  •