Team:Warsaw/JSTest2

From 2008.igem.org

(Difference between revisions)
Line 134: Line 134:
                 for (var i=0;i<a_t.length;i++)
                 for (var i=0;i<a_t.length;i++)
                   {
                   {
-
                   if (topics[a_t[i]]==undefined)topics[a_t[i]]=day+';';
+
                   if (topics[a_t[i]]==undefined)topics[a_t[i]]=nday+';';
-
                   else topics[a_t[i]]+=day+';';
+
                   else topics[a_t[i]]+=nday+';';
                   }
                   }
Line 216: Line 216:
{
{
var days=topics[i].split(';');
var days=topics[i].split(';');
-
var ans=codebase;
+
var ans="";
-
for (var j=0;j<days.length;j++) if(days[j]!="") ans+="arg"+j+"="+days[j]+String.fromCharCode(38);
+
var num=0;
-
ans+="name="+escape(removeHTMLTags(i));
+
for (var j=0;j<days.length;j++)  
 +
{
 +
if(days[j]!="") ans+="arg"+j+"="+days[j]+String.fromCharCode(38);
 +
else num=j;
 +
}
 +
ans=codebase+"num="+num+String.fromCharCode(38)+ans+"name="+escape(removeHTMLTags(i));
document.getElementById("result").innerHTML+='<a href="'+ans+'">'+i+"</a><br>";
document.getElementById("result").innerHTML+='<a href="'+ans+'">'+i+"</a><br>";
}
}
Line 235: Line 240:
var days=['6_May_2008','7_May_2008'];
var days=['6_May_2008','7_May_2008'];
-
var params="";
+
var params="num="+days.length+String.fromCharCode(38);
for (var i=0;i<days.length;i++) params+="arg"+i+"="+days[i]+String.fromCharCode(38);
for (var i=0;i<days.length;i++) params+="arg"+i+"="+days[i]+String.fromCharCode(38);

Revision as of 09:58, 26 October 2008

Gallery Bricks Notebook Team Project Home

Browse by topics

Start dateEnd date
Jump