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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reload page while maintaining WINDOWSIZE

Status
Not open for further replies.

wolf8963

MIS
Jul 17, 2010
7
0
0
US
Hi,
Ive written an vbscript HTA to monitor services running on a server.
I have added an automatic refresh to reload the page every 15 minutes (Ive tried both <META HTTP-EQUIV="refresh" CONTENT="60"> and window.location.reload())

The problem is that each time it reloads or refreshes, it returns to normal window size even if it was previously minimized.

Is there a way to have it reload to whatever windowsize it was in prior to the reload?

Thanks
w


 
Add some javascript into the body onload event to set the window size.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Hi Chris,

Thanks for the reply. If I set the size in OnLoad()wont that just change the dimensions of the window each time it reloads?

Whereas I need to detect whether it is "minimized" or "normal" prior to the reload, and then keep it in that state on reload.

thx,
w
 
Minimised means "as a taskbar button" not reduced in size

Check document.clientWidth and document.clientHeight when launching the sizing routine.


Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Sorry Chris,

I must be missing something. 'as a taskbar button' is what I wish to detect. In vbscript it refers to the property as WINDOWSTATE.(Maybe thats where the confusion is - in the title of this msg I put windowsize.)

In any case, I need to check if the window miminized as a task button, and keep it in that state if so. If not, I need to return it to the normal size of 980x800.

Here is my onload sub. (ID timers are commented out in favor of a .refresh property elsewhere)

Sub Window_Onload
window.reSizeTo 980, 800
self.Focus()
' iTimerID = window.setInterval("Numbercells", 60000)
' iTimerID = window.setInterval("ReLoad", 600000)
Numbercells
End Sub

(Numbercells is the subroutine I call to populate the table that is the main feature of this page.)

Another note is that I have not written in javascript before. So if Javascript has the solution, it would be helpful to provide the code required if it is simple.

thanks.
w
 
Hi

You posted the same question in thread1600-1665888. Despite your question has nothing to do with AJAX for now, would be better to go that way.

The undesired change of the window status occurs on reload and AJAX is a way to refresh a part of the page content without reload. Not sure how Explorer will behave, but I would give it a try anyway.

Note that one thing is sure : neither HTML, XHTML or CSS will help you with this, so this discussion is off-topic in this forum.


Feherke.
 
And there is no method or property in javascript to detect when or if a mindow is maximised or minimised.

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top