Team:Warsaw/JSTest

From 2008.igem.org

(Difference between revisions)
Line 111: Line 111:
var currtitle=removeHTMLTags(notags[3]);
var currtitle=removeHTMLTags(notags[3]);
currtitle=trimStr(currtitle.replace('+',' '));
currtitle=trimStr(currtitle.replace('+',' '));
-
alert ("C: "+currtitle+"\nT: "+title);
+
//alert ("C: "+currtitle+"\nT: "+title);
if (currtitle==title)  
if (currtitle==title)  
{
{
-
if (i+1<titles.length) return ans.substring(ans.indexOf(titles[i]),ans.indexOf(titles[i+1]));
+
if (i+1<titles.length) return ans.substring(ans.indexOf(titles[i])+titles[i].length,ans.indexOf(titles[i+1]));
-
else return ans.substring(ans.indexOf(titles[i]));
+
else return ans.substring(ans.indexOf(titles[i])+titles[i].length);
}
}
}
}
}
}
-
/*
 
-
var topics=ans.split(h3);
 
-
for (var i=0;i<topics.length;i++)
 
-
{
 
-
if (removeHTMLTags(trimStr(topics[i]))==removeHTMLTags(trimStr(title))) return topics[i+1];
 
-
}
 
-
*/
 
return "Search Error";
return "Search Error";

Revision as of 01:55, 26 October 2008

Gallery Bricks Notebook Team Project Home