Cerixus
asked on
Dynamically update <div> while asp script is looping using response.flush
I sort of did this before, but it doesn't work right and I want to start from scratch. I have attached some pseudo code, and I would appreciate someone telling me how to make it update the div tag at the top with the MACHINENAME it is currently scanning. I am using ASP.
<html>
<body>
<div id="loading">Now scanning MACHINENAME</div>
<table>
<tr>
<td>Name</td>
<td>IP addrss</td>
<tr>
LOOP
Ping MACHINENAME
<tr>
<td>MACHINENAME</td>
<td>MACHINEIP</TD>
</tr>
ENDLOOP
</table>
</body>
</html>
ASKER
You are totally misunderstanding what I want.
Ignore the machine name thing.
Just pretend it's looping through records in a database. I want something that shows what record it is currently on. Like at the top of the page I want it to say "Now scanning XXX...", then when it loops to the next item it will update to say "Now scanning YYY...".
Ignore the machine name thing.
Just pretend it's looping through records in a database. I want something that shows what record it is currently on. Like at the top of the page I want it to say "Now scanning XXX...", then when it loops to the next item it will update to say "Now scanning YYY...".
ASKER
I tried an iframe approach. At the top of my page, I have this:
Status: <iframe src="status.asp?status=Loa ding..." name="status"></iframe>
Then, in the loop I have this:
currentName = arrTXT(intTXT)
Response.Write("<script>wi ndow.open( 'status.as p?status=" & currentName & "','status');</script>")
response.flush
Oddly, the iframe never appears until it finishes the report, at that time it does display the proper information (the last piece of data). however, if you watch the browseres status bar, you can see it referencing status.asp and passing the proper variables.
Help
Status: <iframe src="status.asp?status=Loa
Then, in the loop I have this:
currentName = arrTXT(intTXT)
Response.Write("<script>wi
response.flush
Oddly, the iframe never appears until it finishes the report, at that time it does display the proper information (the last piece of data). however, if you watch the browseres status bar, you can see it referencing status.asp and passing the proper variables.
Help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Anyway, to do this, look into active -X controls and hope everyone is running IE with a wide open system.