Team:Warsaw/JSTest

From 2008.igem.org

(Difference between revisions)
Line 101: Line 101:
//ans=ans.replace("<h3></h3>","");
//ans=ans.replace("<h3></h3>","");
h3=new RegExp(/<(h3).*>(.*)<\/\1>/i);
h3=new RegExp(/<(h3).*>(.*)<\/\1>/i);
-
alert(ans.split(/<h3>/i));
+
//alert(ans.split(/<h3>/i));
-
var topics=ans.split(h3);
+
var front=ans.split(/<h3>/i);
-
for (var i=0;i<topics.length;i++)
+
for (var i=0;i<front.length;i++)
{
{
-
if (removeHTMLTags(trimStr(topics[i]))==removeHTMLTags(trimStr(title))) return topics[i+1];
+
var end=topics[i].split(/<\/h3>/i);
 +
for (var j=0;i<end.length;j++)
 +
if (removeHTMLTags(trimStr(end[i]))==removeHTMLTags(trimStr(title))) return end[i+1];
}
}

Revision as of 00:37, 26 October 2008

Gallery Bricks Notebook Team Project Home