SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict itHighway's Avatar
    Join Date
    Jan 2008
    Location
    GUJ
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Querystring and HTML file

    I have seen following code in very famous website (sittercity*com). The code passes values in query string to a html file.

    function sendAjaxRequest( ajax_include, parameters, send_result_to )
    {
    var ajax = createAjaxObject();
    var resistCache = new Date().getTime();

    url = '/ajax_dispatcher.html?ajax_include=' + ajax_include + '&' + parameters + '&send_result_to=' + send_result_to + '&dummy=' + resistCache;
    ajax.open( 'get', url, true );
    ajax.onreadystatechange = function () { handleAjaxResponse( ajax ); };
    ajax.send( null );
    }
    My question is, is it possible to pass values to a html file in query string? If no then how is this website doing it?

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,269
    Mentioned
    196 Post(s)
    Tagged
    2 Thread(s)
    Is it an HTML file or a file with the .html extension?

    For that matter, could there be some kind of mod_rewrite going on?

    A server can go to a page with a "#" or a "?" in the request.

    AFAIK most browsers will go to the # location.

    For the ? parameters either server-side or maybe javascript could do something with it. Since it's AJAX I guess it's safe to assume javascript will be enabled anyway.

  3. #3
    SitePoint Addict itHighway's Avatar
    Join Date
    Jan 2008
    Location
    GUJ
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's a file with .html extension.
    I too think that it has something to do with AJAX.


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
  •