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

JS Window Close

Status
Not open for further replies.

candrid

IS-IT--Management
Aug 30, 2001
38
US
Hey I wanted to click a link on my index page... have the new page load and close the index... perf. Java script, though be warned that I do not know Java script very well so if you could explain it to me a bit, I'd appricate it.

Hope everyone had a good holiday.

-can. --"Hello Microsoft? Yeah this is Mike again.. now it says: "Hit any key when ready..." My question is: "Where's the "any key"? Is my keyboard broken..?
 
Are you opening a new page(window) from the index page, then closing the index page? Please be clearer. If this is the case, you can, however IE will prompt the user to confirm the closure, since index is your parent window. "The surest sign that intelligent life exists elsewhere in the universe is that it has never tried to contact us"
Bill Watterson, Calvin & Hobbes
 
Yup,

I want to close the window (parent). Thanks. I would rather have it that the prompt didnt pop up though.

Maybe a script that chamges its name from (parent) to something else during its load.... hmm who knows. thanks.

-can. --"Hello Microsoft? Yeah this is Mike again.. now it says: "Hit any key when ready..." My question is: "Where's the "any key"? Is my keyboard broken..?
 
Javascript will only close a window that javascripts open. When trying to close the main or parent window that was not created with script it will warn DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
Fraid DeZiner's right, if its a parent window, nothing you can do about it. Incedentially, why would you want to close the index page anyway? If you don't want it hanging around, why not just have your new page load in the same browser? "The surest sign that intelligent life exists elsewhere in the universe is that it has never tried to contact us"
Bill Watterson, Calvin & Hobbes
 
why not have a button or a link that will enable the parent window to close from the child window?? You know what I mean?? I have not failed; I merely found 100,000 different ways of not succeding...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top