MSFN Forum: VBScript commentboard - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

VBScript commentboard comment/orum board in VBScript help :? Rate Topic: -----

#1 User is offline   ryuko 

  • Newbie
  • Group: Members
  • Posts: 27
  • Joined: 31-December 08

Posted 31 December 2008 - 10:29 PM

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



Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy