%
Dim pageMode
Dim username
Dim password
Dim annotationString
Dim errorMessage
If ( Request.Form = "" ) Then
pageMode = "new"
Else
username = Request.Form( "username" )
password = Request.Form( "password" )
If ( Request.Form( "pageMode" ) = "save" ) Then
pageMode = "save"
Call saveAnnotation( Request.Form( "annotation" ), username, password )
Else
pageMode = "retrieve"
errorMessage = ""
annotationString = getAnnotation( username, password )
If ( Len( annotationString ) = 0 ) Then
errorMessage = "Your annotation could not be found. Please check your name and password entries and try again."
End If
End If
End If
%>
4L - Simulations - Newton in Action: Third Law - Explain 4
Explain
Third
Law
Equals
and opposites. What's happening in these examples?
Sometimes
it is easy to see the laws of physics when experiments are done in zero gravity.
Have
a look at some or all of these movies - they each show different aspects of
forces and movement. What do you think is happening - and why?
You can type your explanations into word processing software such as Word,
or into a text editor such as NotePad. Save your notes and keep a printout
if you want to. You can compare your ideas with other students or your teacher.
heppell.net
<%
Private Sub saveAnnotation( annotation, username, password )
Dim FileObject
Dim annotationFile
Set FileObject = Server.CreateObject( "Scripting.FileSystemObject" )
annotationFile = getPathToFile( Request.ServerVariables("PATH_TRANSLATED") ) + "\annotations.txt"
Set OutStream = FileObject.OpenTextFile ( annotationFile, 8, True )
OutStream.WriteLine ( username & "|" & password & "|" & annotation )
Set OutStream = Nothing
End Sub
Private Function getAnnotation( username, password )
Dim FileObject
Dim annotationFile
Dim arrAnnotationData
Dim annotationFound
Set FileObject = Server.CreateObject("Scripting.FileSystemObject")
annotationFile = getPathToFile( Request.ServerVariables("PATH_TRANSLATED") ) + "\annotations.txt"
Set InStream = FileObject.OpenTextFile ( annotationFile, 1, False, False )
annotationFound = false
Do While ( Not InStream.AtEndOfStream and Not annotationFound )
arrAnnotationData = Split( InStream.Readline, "|" )
annotationFound = ( ( arrAnnotationData( 0 ) = username ) And ( arrAnnotationData( 1 ) = password ) )
Loop
If ( annotationFound ) Then
getAnnotation = arrAnnotationData( 2 )
Else
getAnnotation = ""
End If
Set InStream = Nothing
End Function
%>