Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 6th, 2005, 01:46 AM
quantum1976 quantum1976 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 1 quantum1976 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
add messages to textarea on the fly in vbs

I've got a vbscript that performs several functions and uses an IE window to display a status window. This IE window contains a textarea to display messages as each function is completed.

To update the textarea, I read everything into a variable, add my new message to it, and write it back to the textarea.

The problem I am having is that I cannot insert VBCRLF or <BR> between each message to place each of them on a new line. All of the messages run together and only get word wrapped.

Here are a few sections from the script:
Set oIE = WScript.CreateObject("InternetExplorer.Application", "oIE_")
With oIE : .left = 100 : .top = 80 : .width = 500 : .height = 160
.menubar = False : .toolbar = False : .statusbar = False : End With
Set oDoc = oIE.document
With oDoc 'fill in the (ie) dialog, with a message and progbar
.Open
.WriteLn ("<html><head><title>" & sCaption & "</title></head> ")
.WriteLn ("<body bgcolor='Silver' leftmargin=15 topmargin=5 scroll='no' > ")
.WriteLn ("<textarea id=txtBox rows=3 cols=50>")
.WriteLn ("")
.Close End With ' oDoc

Sub WriteToProgBar(NewMsg)
'add text to the textarea and scroll to the bottom
temp = oDoc.getElementById("txtBox").innerHTML
oDoc.getElementById("txtBox").innerHTML = temp & vbcrlf & NewMsg
oDoc.getElementById("txtBox").scrollTop =
oDoc.getElementById("txtBox").scrollheight
End Sub

Any help on this would be greatly appreciated,

Rich

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > add messages to textarea on the fly in vbs


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT