<%@Language="JScript"%><% // This version of simple hidden cleans up after itself using the // download behavior function WriteLine(s) { Response.Write(s + "\r\n"); } Response.ContentType = "application/x-javascript"; var guid = Request.QueryString.Item("pass"); var passes = Session.Contents("passes"); var pass = passes.selectSingleNode("//pass[@guid='" + guid + "']"); if(pass == null) { // This is what we'll consider to be the "Fake Code" Response.Write("//fake"); } else { passes.documentElement.removeChild(pass); // This is what we'll consider to be the "Real Code" WriteLine(" var x = document.body.appendChild(document.createElement('div')); "); WriteLine(" x.addBehavior('#default#download'); "); WriteLine(" x.startDownload(wtf.src,function(){}); "); } %>