function setPop(ont_encode) { var selector = "a[name="+ont_encode+"]"; $(selector).each(function() { //console.log($(this)); $(this)[0].dataset.content = createPopLink(ont_encode); }); } function createPopLink(ont_encode) { var d = new Date(); var curM = d.getMonth(); LINKURL1 = "http://www.knapsackfamily.com/YAKUZEN/result.php?kword="+ ont_encode + "&mode=list5"; LINKURL2 = "http://www.knapsackfamily.com/YAKUZEN/effect.php?fname="+ ont_encode; LINKURL3 = "http://www.knapsackfamily.com/map/syunWordSearchPM.php?kword="+ ont_encode + "&m="+curM+"&term=3"; content = " - レシピ
- 効能
- 旬な地域"; return content; } function createXmlHttpRequest() { var xmlhttp = false; if( window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else if(window.ActiveXObject) { try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } } return xmlhttp; } function getElementValue( element, name ) { if( null == element.getElementsByTagName( name )[0].childNodes[0]){ return ''; } return element.getElementsByTagName( name )[0].childNodes[0].nodeValue; } ///// 設問選択結果保存用 ///// var curUrl; var xmlhttpRegetSortList; function onSelQuest( qIndex, selIndex ){ url = '/onSelQuest.php?t=' + Math.random() + '&q=' + qIndex + '&sel=' + selIndex; curUrl = url; //window.alert(url); if( 60 == qIndex ){ //window.alert(url); } xmlhttpRegetSortList = createXmlHttpRequest(); if (xmlhttpRegetSortList) { xmlhttpRegetSortList.onreadystatechange = selQuest ; xmlhttpRegetSortList.open('GET', url, true); xmlhttpRegetSortList.send(null); } } function selQuest() { if (xmlhttpRegetSortList.readyState == 4 && xmlhttpRegetSortList.status == 200) { //document.getElementById(sortListDivName).innerHTML = xmlhttpRegetSortList.responseText; var xmlDoc = xmlhttpRegetSortList.responseXML; //スコアリスト var score = xmlDoc.documentElement.getElementsByTagName("score"); if(typeof(score) != 'undefined' && null!=score){ for(var i=0; i