Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script fails to update the screen

Status
Not open for further replies.

martynj

Programmer
Oct 19, 2001
11
GB
I have a problem whereby things seem to happen so quick that the screen does not refresh.

In VB i thing we would issue a doevents so that the operating system can catch up and paint the screen.

Anyway if you look at the code below you will see that after displaying the dialog box it then connects to an .asp component on a server...the dialog box dissapears off the screen but the area that it covered is not repainted until that operation is finished....

Is there some way in vbscript to control how the screens refreshes..


if objxmlhttp.responsetext <> &quot;Error&quot; then
document.getelementbyid(&quot;data&quot;).async = false
document.getelementbyid(&quot;data&quot;).loadxmlobjXmlHttp.responsetext)

retVal = showmodaldialog(&quot;htmlTemplates\confirmScreen.htm&quot;, data,&quot;dialogHeight: 2.5in; center: yes; help : no; resizable : no; status : no; scroll: no;&quot;)

if retval = &quot;&quot; then exit function ' cancelled action

strUrl = &quot;someaspcomponent.ASP?WCI=initiateFileLoad&strFileName=&quot; & strFileName & &quot;&strExternalDirectoryNump=&quot; & document.getelementbyid(&quot;ExternalDirectoryNump&quot;).value

Set objxmlhttp = CreateObject(&quot;Microsoft.XMLHTTP&quot;)
objxmlhttp.open &quot;GET&quot;, strUrl, False
objxmlhttp.send

' its only here after this code that the page refreshes where the dialog box was displayed

currentDataSrc.recordset.delete
else

outputMessage &quot;Header Record Failed Check&quot;
end if
end if

Regards

Martyn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top