Jump to content

VBScript commentboard


Recommended Posts

I have this so far it works but when you refresh or close it out it doesnt save the data

basicaly its a simple forum board

(i want it to save the comments not destroy them on refresh or closeout is there any way)

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Test</title>
<script language="vbscript">
Option Explicit


Sub AddRow()
Dim objTable : Set objTable = window.document.getElementById("tbl1")
Dim objRow : Set objRow = objTable.insertRow()
Dim intCount, objCell
For intCount = 0 To 0
Set objCell = objRow.insertCell()
objCell.innerHTML = "name:" & document.forms(0).name.value & "<br>" & document.forms(0).text.value & "<hr>"

Next

End Sub
</script>

<style type="text/css">
body {
background-color: #191B1C;
overflow: auto;
color: #FFFFFF;
}
a {
color: #FFFFFF;
}
textarea {
overflow: auto;
width: 200;
height: 100;
}
</style>

<div align="center"><h1>Test</h1></div>
<br>


<table id="tbl1" width="100%" border="0">
<tr>
<th> </th>
</tr>
</table>
<form>
<input type="text" name="name" value="username">
<br>
<textarea name="text" > </textarea>
<br>
<br><input type="button" value="Add Row" onclick="AddRow()">
</form>
<a href="pastcomments.htm?viewpast=ttr1">view past comments</a>
</body>
</html>

i tried these to possibilitys but found them not to work

dim b
dim fs

Set fs = CreateObject("Scripting.FileSystemObject")
Set b = fs.CreatetextFile("index.htm", True)
b.WriteLine(objtable.innerhtml)
b.Close

 Sub window_onload()
objtable.innerhtml = (document.cookie)
document.cookie = objcell.innerhtml
End Sub

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...