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 6615765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:30:10+00:00 2026-05-25T20:30:10+00:00

Before I ask my question I have gone through this: Better alternative to an

  • 0

Before I ask my question I have gone through this: Better alternative to an iframe?, and haven’t found a solution to my problem, or maybe I did not understand correctly!

I have a HTML-page which contains a Dojo-tree on the left hand side. When I click on an element on the left-hand tree (Say element1), I load an iframe on the right with a url:

www.something.com?selected=element1

Now the source of the frame is a jsp which does this:

<% 
/* Get the user selection*/
String selectedElement = request.getParameter("selected");

/* Code to Fetch some content from the database using the above string */
%>

Since the left hand side tree has many elements, clicking on each element loads the iframe on the right hand side as above. The arrangement works perfectly fine. But I am wondering if this is the best way to do it? Can I some how not use iframes and still obtain the same result? I read somewhere that loading iframes is several times slower than not loading iframes.
Any help will be appreciated!

  • 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-25T20:30:11+00:00Added an answer on May 25, 2026 at 8:30 pm

    If the links are in the same domain, you could use jQuery load to populate a DIV instead of an iframe. This would be much better from an organizational perspective and make your page much easier to navigate for people with accessibility issues. If the content is from another domain, you’re stuck with the iframe unless you process the requests on your server.

    <div id="menu">
        <a class="menu-item" href="/?selected=foo">Foo</a>
        <a class="menu-item" href="/?selected=bar">Bar</a>
        ...
    </div>
    
    <div id="content">
      ...default content...
    </div>
    
    <script type="text/javascript">
       $(function() {
           $('.menu-item').click( function() {
               $('#content').load( $(this).attr('href') );
               return false;
           });
       });
    </script>
    

    Dojo example

    <script type="text/javascript">
       dojo.ready( function() {
           dojo.query('.menu-item').onclick( function() {
               dojo.xhrGet({
                  url: dojo.attr(this,'href');
                  load: function(content) {
                       dojo.byId('content').innerHtml = content;
                  }
               });
               return false;
           });
       });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't know if this question has been ask before. But I have a
Before I ask this question I must point out that I have tried to
I tried to ask this question before but I guess I didnt explain myself
Let me explain the situation before I ask the question. I have a site,
I don't know if someone ask this question before.I am working on MVC +
I have a model Question with a field called userid , before one ask
Before I ask my question, please consider this scenario: a user on my website
I have ask similar question before : Java String Memory Leak But I was
I tried to ask this question once before, but nobody understood what I want
First off, before I ask, i would like to point out that this question

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.