1//////////////////////////////////////////////////////////////////// 2// 3//¡¡Goo-netÃæ¸Å¼Ö¸¡º÷JS¥Õ¥¡¥¤¥ë 4// ¥á¡¼¥«¡¼¡¦¼Ö¼ï¤Îajax 5// 6//////////////////////////////////////////////////////////////////// 7 8//------summary.php(guarantee,gw_dressup)¤Ç»ÈÍÑ---------------------------------------- 9 10 11 12//=========================================== 13// ¥á¡¼¥«¡¼ÁªÂòÍѥɥí¥Ã¥×¥À¥¦¥ó¥ê¥¹¥È¤ò¥»¥Ã¥È 14//=========================================== 15function setMakerCd( maker_cd_data ){ 16 // ¥¨¥é¡¼È½Äê 17 if( document.getElementById("select_maker_cd") == null || document.getElementById("select_car_cd") == null ) { 18 return; 19 } 20 21//alert( maker_cd_data ); 22 //XMLHttpRequest¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À® 23 var httpoj = createHttpRequest(); 24 var method = "GET"; 25 var fileName = "/php/search/ajax_maker_search.php"; 26 var async = true; 27 28 //open ¥á¥½¥Ã¥É 29 httpoj.open( method , fileName , async ); 30 httpoj.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); 31 httpoj.setRequestHeader("Cache-Control", "no-cache"); 32 33 34 35 var frm = document.form1; 36 var now_count = document.getElementById("select_maker_cd").length; 37 for(var counter=now_count-1; counter>=0; counter--){ 38 document.getElementById("select_maker_cd").options[counter] = null; 39 } 40 document.getElementById("select_maker_cd").options[0] = new Option("¥á¡¼¥«¡¼ÁªÂò",""); 41 document.getElementById("select_car_cd").options[0] = new Option("¼Ö¼ïÁªÂò",""); 42 43 44 //¼õ¿®»þ¤Ëµ¯Æ°¤¹¤ë¥¤¥Ù¥ó¥È 45 httpoj.onreadystatechange = function(){ 46 //readyStateÃͤÏ4¤Ç¼õ¿®´°Î» 47 if (httpoj.readyState == 4){ 48 //¥³¡¼¥ë¥Ð¥Ã¥¯ 49 if( httpoj.status == 200 ) { 50 var responseText = httpoj.responseText; 51 if( responseText != '' ) { 52 var data = eval(responseText); 53 j=1; 54 for(i=0; i<data.length; i++){ 55 if ( data[i].maker_cd == maker_cd_data ){ 56 document.getElementById("select_maker_cd").options[j++] = new Option(data[i].maker_nm,data[i].maker_cd,1,1); 57 } else { 58 document.getElementById("select_maker_cd").options[j++] = new Option(data[i].maker_nm,data[i].maker_cd); 59 } 60 } 61 } else { 62 document.getElementById("select_maker_cd").options[0] = null; 63 document.getElementById("select_maker_cd").options[0] = new Option("¥á¡¼¥«¡¼ÁªÂò",""); 64 } 65 } 66 httpoj = null; 67 } 68 } 69 httpoj.send( maker_cd_data ); 70 71 72} 73 74 75//=========================================== 76// ¼Ö¼ïÁªÂòÍѥɥí¥Ã¥×¥À¥¦¥ó¥ê¥¹¥È¤ò¥»¥Ã¥È 77//=========================================== 78function setCarCd( maker_cd_data, car_cd_data ){ 79 // ¥¨¥é¡¼È½Äê 80 if( document.getElementById("select_maker_cd") == null || document.getElementById("select_car_cd") == null ) { 81 return ''; 82 } 83 84 //XMLHttpRequest¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À® 85 var httpoj = createHttpRequest(); 86 var method = "GET"; 87 var fileName = "/php/search/ajax_car_search.php?brand_cd=" + maker_cd_data; 88 var async = true; 89 //open ¥á¥½¥Ã¥É 90 httpoj.open( method , fileName , async ); 91 httpoj.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8'); 92 httpoj.setRequestHeader("Cache-Control", "no-cache"); 93 94 95 var frm = document.form1; 96 var now_count = document.getElementById("select_car_cd").length; 97 for(var counter=now_count-1; counter>=0; counter--){ 98 document.getElementById("select_car_cd").options[counter] = null; 99 } 100 document.getElementById("select_car_cd").options[0] = new Option("¼Ö¼ïÁªÂò",""); 101 102 103 //¼õ¿®»þ¤Ëµ¯Æ°¤¹¤ë¥¤¥Ù¥ó¥È 104 httpoj.onreadystatechange = function(){ 105 //readyStateÃͤÏ4¤Ç¼õ¿®´°Î» 106 if (httpoj.readyState == 4){ 107 //¥³¡¼¥ë¥Ð¥Ã¥¯ 108 if( httpoj.status == 200 ) { 109 var responseText = httpoj.responseText; 110 if( maker_cd_data != '') { 111 if( responseText != '' ) { 112 var data = eval(responseText); 113 j=1; 114 for(i=0; i<data.length; i++){ 115 if ( data[i].car_cd == car_cd_data ){ 116 document.getElementById("select_car_cd").options[j++] = new Option(data[i].car_nm,data[i].car_cd,1,1); 117 } else { 118 document.getElementById("select_car_cd").options[j++] = new Option(data[i].car_nm,data[i].car_cd); 119 } 120 121 } 122 } 123 } else { 124 document.getElementById("select_car_cd").options[0] = null; 125 document.getElementById("select_car_cd").options[0] = new Option("¼Ö¼ïÁªÂò",""); 126 } 127 } 128 httpoj = null; 129 } 130 } 131 httpoj.send( null ); 132} 133 134 135 136//XMLHttpRequest¥ª¥Ö¥¸¥§¥¯¥ÈÀ¸À® 137function createHttpRequest(){ 138 try { 139 netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); 140 } catch (e) { 141 } 142 //Win ieÍÑ 143 if(window.ActiveXObject){ 144 try { 145 //MSXML2°Ê¹ßÍÑ 146 return new ActiveXObject("Msxml2.XMLHTTP") //[1]' 147 } catch (e) { 148 try { 149 //µìMSXMLÍÑ 150 return new ActiveXObject("Microsoft.XMLHTTP") //[1]' 151 } catch (e2) { 152 return null 153 } 154 } 155 } else if(window.XMLHttpRequest){ 156 //Win ie°Ê³°¤ÎXMLHttpRequest¥ª¥Ö¥¸¥§¥¯¥È¼ÂÁõ¥Ö¥é¥¦¥¶ÍÑ 157 return new XMLHttpRequest() //[1]' 158 } else { 159 return null 160 } 161} 162 163 164 165 166 167 168// --------- summary.cgi EOF ------------------------------------------ 169
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.