|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > add messages to textarea on the fly in vbs |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|