<%
set fso = Server.CreateObject("Scripting.FileSystemObject")
configFile = Server.MapPath("/") & "\test.log"
set theFile = fso.OpenTextFile(configFile, 1) '1=Read, 2=Write, 8=Append
do until theFile.AtEndOfStream or x = 10
Response.Write(theFile.ReadLine & "<br />")
x = x + 1
loop
theFile.close
%>
August 17, 2007
VBScript: SIMPLE FileSystemObject
JavaScript: Notes from 010411
Always start with;
<script language="javascript">
<!--
//code here
-->
</script>
<script language="javascript">
//Popup Message
window.alert("Message Here");
//Click OK or Cancel Message Box
window.confirm("OK or Cancel Message Here");
//Prompt User for Input
window.prompt("Input Vars");
//Creates a Function called calc
function calc(i) {
//Sets x to what the user types in
var x=window.prompt("Enter Number");
//Shows what the User Just Typed In
window.alert("You Entered: " + x);
//Prints to the Screen (VBScript = Response.Write)
document.write(i);
}
calc("Test Message");
</script>
Call a function when the page loads;
//In the BODY tag enter the function like so <body onload="calc();">
Old Tattered Notes…
I’m going to be entering a bunch of old notes I had laying around. ASP, VBScript, JavaScript and maybe some other stuff.
Also, I have decided to learn PHP. It’s like ASP/VBScript because they are both scripting languages (Spaghetti code! Wee!) but a lot more powerful. As far as working as a web developer the main choices I’ve seen are, ASP, ASP.NET, and PHP. ASP is getting to be a rarety as ASP.NET is wanted more and more. PHP, however, is starting to show up more and more also.