I have an asp page, on which I have a button. The onclick calls a js function that reads some screen data, then sets the .location an iframe to another asp page. This other asp page has code which updates a sql server database.
Since the main page isn't being reloaded, I want to show a status immediately after the iframe's new .location code runs. What seems to be happening is that the javascript code is asynchronous, so that after the call setting the new iframe.location, my call to check the output (the iframe source writes a new textbox in the iframe with status info in it), returns nothing.
How do I (without randomly timed delay loops) wait for the iframe to finish it's update, write the status to the textbox on the iframe and then read it--all within the same javascript function, ie not having to have the user hit another button to see the results?
I understand that when the script started, the lay of the land was one way, and it changed while the script was running. But I need to know how I can 'refresh' the objects javascript sees on the page without exiting the code.
Thanks,
--Jim
Since the main page isn't being reloaded, I want to show a status immediately after the iframe's new .location code runs. What seems to be happening is that the javascript code is asynchronous, so that after the call setting the new iframe.location, my call to check the output (the iframe source writes a new textbox in the iframe with status info in it), returns nothing.
How do I (without randomly timed delay loops) wait for the iframe to finish it's update, write the status to the textbox on the iframe and then read it--all within the same javascript function, ie not having to have the user hit another button to see the results?
I understand that when the script started, the lay of the land was one way, and it changed while the script was running. But I need to know how I can 'refresh' the objects javascript sees on the page without exiting the code.
Thanks,
--Jim