sobota, kwietnia 21, 2007

Linki z soboty:
  1. http://dbachrach.com/blog/2007/04/15/spotlight-like-search-as-you-type-with-css-ajax-js/ - ciekawe podejście i wykorzystywanie js. Zawiera również odnośnik do przykładów editInPlace.
  2. Przykłady:
  3. function hideSearchTypes (i,j) {
  4. var theDiv = document.getElementById(j).getElementsByTagName(‘li’);
  5. for(var d = 1; d < theDiv.length; d++) {
  6. var theID = ‘res-’+i+‘-’+d;
  7. document.getElementById(theID).style.display = ‘none’;
  8. }
  9. }
Inny przykład:
  1. <form id="search_form" action="" method="get">
  2. <input type="text" value="" name="q" id="q" autocomplete="off" onkeyup="doSearch();" />
  3. <input type="image" id="search_image" onclick="doSearch();return false;" src="search_icon.png" alt="Search" />
  4. </form>
  5. <div id="searchResultsDiv">
  6. Start typing. Your results will show below instantly.
  7. </div>
Biblioteka google - http://code.google.com/p/jslibs/wiki/JavascriptTips - przeznaczone do obsługi biblioteki seamonkey (silnika JS w Mozilli)

  1. Binary with XmlHTTPRequest

    var req = new XMLHttpRequest();
    req.open('GET', "http://code.google.com/images/code_sm.png",false);
    req.overrideMimeType('text/plain; charset=x-user-defined');
    //req.overrideMimeType('application/octet-stream');
    req.send(null);
    var val = req.responseText;
    Print( escape(val.substr(0,10)) );