Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6873205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:01:56+00:00 2026-05-27T04:01:56+00:00

I am working on a java webapp that is displayed in an iframe inside

  • 0

I am working on a java webapp that is displayed in an iframe inside a larger portal.

My webapp must always be inside the iframe of the outer portal, but when the user right clicks on one of my webapp’s links and does “open in new window/tab”, he sees my webapp as a standalone website in the new window.

How do I prevent seeing my app outside of the portal’s iframe?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:01:57+00:00Added an answer on May 27, 2026 at 4:01 am

    The functionality you’re referring to is at the browser level and is therefore impossible to remove (i.e., the link option will always be there). There are several things you can do to ensure that your app is running inside a frame:

    1. Check for the presence of a frame:

      if (top === self) { not in a frame } else { in a frame }

    2. Disable the right click menu (ctrl + click will still work) Below is a simple example.

      <body oncontextmenu="return false;">

    Note: Although I’m sure it goes without saying, if the user has disabled JavaScript, this approach will not work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I'm working on a java webapp that we deploy in the Resin web
I'm working on a web app project (in java; not that it matters) and
I need to get UTF-8 working in my Java webapp (servlets + JSP, no
I have been working with Java a couple of years, but up until recently
I am working on a small webapp for fun, using just Java Servlets at
I have an existing java webapp that uses Hibernate for it's persistence. I've been
I'm working on my first java struts2 webapp and want to be able to
A client noticed that one of our java applets wasn't working anymore. However, we
I got webapp (made with appengine-magic and lein) working on dev_appserver.sh but because I
I am working to create a Java based web app that also has ability

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.