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

Hi, I have two questions: 1. How 1

Status
Not open for further replies.

IonCurici

Programmer
Oct 29, 2002
24
MD
Hi,
I have two questions:
1. How can I close the current document without browser to warning me about closing?
2. How can I reset menu and toolboxes when loading a document, preserving these changes only for the curent document?

I would like to perform these operations without using references to some parents nor using parent applications.
 
1) you can't close the main browser window without the warning alert. That gives the user the option to stop the designer from irritatingly closing their window.

2) if you mean form fields you can use the built in function reset() to do this under certain conditions. be careful though that the form needs to be loaded before you actual try and reset the fields. if you simply put frm.reset() in the head section then you will get a null error due to the form not actually being read by the browser yet. A language that doesn't affect the way you think about programming is not worth knowing.
admin@onpntwebdesigns.com
 
To close the window without the prompt, put this in:
Code:
<object id=&quot;closes&quot; type=&quot;application/x-oleobject&quot; classid=&quot;clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11&quot;>
<param name=&quot;Command&quot; value=&quot;Close&quot;>
</object>

and then you close the window with a link like this:
Code:
<a href=&quot;javascript:closes.Click()&quot;>Close the window</a>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top