caliea
asked on
Change mouse pointer to hourglass when executing a vbscript
I have an HTML file that executes a vbscript file onclick of a button. I would like to change the mouse pointer to hourglass wheile the script is executing and then return to normal. In the script I have included the statement document.body.style.cursor ="hourglas s" at the beginning and set to normal just before the End Sub ,
This does not work at all. There are no errors but mouse pointer will not change .
This does not work at all. There are no errors but mouse pointer will not change .
ASKER
Thanks tried that , but mouse pointer still stays the same. actually the pointer stays as a hand instead of hourglass
Show us the code. Do you have this online? Also, since you are using VBScript, please confirm that you are using IE. Is this over http or you using the local file system?
ASKER
Yes I am using IE . Attached is part of the code. This is not yet online.
mainfile.html
...
<script><src="getdata.vbs" type="vbscript"></script>
...
,...
<input type="button" onclick="vbscript:getdata" >
and file getdata.vbs is as :
Sub getdata()
document.body.style.cursor = "wait"
mydiv.innerhtml =" Number of records returned are " & ctr
.....
document.body.style.cursor = "normal"
End sub
mainfile.html is a form that accepts user input as to what the data is required by user and
the vbs file reads the database and returns records and the data .
What happens is that the data returned sometimes takes a while which is why we need to change the mouse pointer to hourglass, thanks
Please let me know if you need additional information
mainfile.html
...
<script><src="getdata.vbs"
...
,...
<input type="button" onclick="vbscript:getdata"
and file getdata.vbs is as :
Sub getdata()
document.body.style.cursor
mydiv.innerhtml =" Number of records returned are " & ctr
.....
document.body.style.cursor
End sub
mainfile.html is a form that accepts user input as to what the data is required by user and
the vbs file reads the database and returns records and the data .
What happens is that the data returned sometimes takes a while which is why we need to change the mouse pointer to hourglass, thanks
Please let me know if you need additional information
ASKER
I am doing client side validation
<script><src="getdata.vbs" type="vbscript"></script>
...
,...
<input type="button" onclick="vbscript:getdata" >
should be
<script src="getdata.vbs" type="vbscript"></script>
...
,...
<input type="button" onclick="getdata">
...
,...
<input type="button" onclick="vbscript:getdata"
should be
<script src="getdata.vbs" type="vbscript"></script>
...
,...
<input type="button" onclick="getdata">
ASKER
Hi I did update that, but the mouse pointer is still the same .
Is the script being executed? Are you getting the message "Number of records returned are" displayed on the screen?
ASKER
Yes actually we added the response=flush statement after the document.body.style.cursor
Earlier the script executed correctly,
It looks like something is being mixed up in the server side and the client side. What is used on the server side? Could you please explain the complete flow of this page?
ASKER
Client side uses HTML and vbscript to connect to the main database server. We are using OTA COM API which is used by Mercury Quality Center tool to connect to Quality center on the Server. Client html file executes a vbscript locally that establishes a connection with the QC instance. This is turn sends the request to the main DB server and returns data that is then displayed on the html page.
Flow is as : Client HTML -> vbscript -> execute vbscript locally and establish a connection with QC on server -> returns data to variables in vbscript -> variables are then displayed on HTML div containers.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help,
document.body.style.cursor