cancel
Showing results for 
Search instead for 
Did you mean: 

Close portal main window without confirmation message

chinna_babu2
Active Participant
0 Kudos
311

Hi All,

Is it possible to close the Portal Main Window (main page) without a confirmation popup window.

I am launching an iView (can be excel sheet/html page etc) using Quick Link which is attached to a role.

When this iView opens, I want to close the portal main page.

I am using the below code to close the main window.

window.top.close()

But it is prompting a confirmation popup window "Do you want to close this window". I don't want this popup message.

I have tried with below code also, but it is neither prompting nor closing the window.

window.opener=null;
window.close();

window.opener=self;
window.close();

Can anyone tell me how to acheive the above requirement.

Thanks

Chinna.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

never tried, but you could try this:

[Close window without the prompt message in IE7|http://dotnetslackers.com/community/blogs/haissam/archive/2007/04/20/Javascript_3A00_-Close-window-without-the-prompt-message-in-IE7.aspx], another try: [how to close the current window in IE by bypassing the close confirmation dialog|http://www.faqts.com/knowledge_base/view.phtml/aid/37041].

Romano

chinna_babu2
Active Participant
0 Kudos

Hi Romano,

Tried these options, but didn't work on portal window.

Any other suggestions.

Thanks

Chinna.

Former Member
0 Kudos

Hi,

Try this javascript



window.top.open('','_self','');
window.top.close();

Regards

Baby

chinna_babu2
Active Participant
0 Kudos

Hi Baby,

Tried this code, didn't work. Still prompting the confirmation window.

Any other suggestions.

Thanks

Chinna.

Former Member
0 Kudos

Hi,

Could you tell me which version of Internet Explorer using.

Also how you are executing this javascript. Where you kept this code.

What i have tested is after opening the portal i replace the browser URL with this code and its works perfectly in my IE 7.0

javascript:window.top.open('','_self','');window.close();

Regards

Baby

Edited by: Baby on Nov 17, 2009 11:06 AM

chinna_babu2
Active Participant
0 Kudos

Hi Baby,

I am using IE6.

I am executing this code from my AbstractPortalComponent within the doContent method.

I have tested by replacing the browser URL with this script

javascript:window.top.open('','_self','');window.close();

It pops up the confirmation window.

Thanks

Chinna.

chinna_babu2
Active Participant
0 Kudos

Hi

Below code works for me

window.top.opener=null;
window.top.close();

Thanks

Chinna.

Answers (2)

Answers (2)

chinna_babu2
Active Participant
0 Kudos

Thanks for the help.

Former Member
0 Kudos

You can't avoid to display the confirmation message showed by the Internet Explorer browser.