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

  • Home
  • SEARCH
  • 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 7938895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:56:03+00:00 2026-06-03T22:56:03+00:00

when you develop a web application using ExtJS (with its MVC and a Viewport),

  • 0

when you develop a web application using ExtJS (with its MVC and a Viewport), generally there’s no possibility to navigate: every item into the page (buttons, textfields, textareas, …) is bound to a specific method of the view’s controller.
So, when you ‘travel’ through the application, the original URL is always the same and it doesn’t change.

Now, take as example an application with a header menu bar filled with these following buttons:

Home | Setup | Archive

And the original URL of the application take the following:

http://www.mydomain.com/webapp

At this point, when someone click Home or Setup or Archive menu a certain view is displayed into the center region and the URL should change in

http://www.mydomain.com/webapp/[home|setup|archive]

So, if I click Setup menu the following URL should be displayed in the address bar:

http://www.mydomain.com/webapp/setup

Further more, the same page should be shown if I type the same URL into the address bar from another URL.

But currently my webapp still remains into ‘http://www.mydomain.com/webapp‘ showing the requested view. (MyApp.view.Setup, for instance).

That’s the point: how can I develop a webapp (with ExtJS, MVC and Viewport) with URL navigation? Is it possible to do without nesting javascript/html code into other PHP/Ruby/Python/$RANDOM_SERVER_LANGUAGE? (I want to split client by server side)

An implementation of this already exists: it’s the ExtJS API Documentation. If I’m right, there’s no server-side application or .htaccess that provide the page requested.
In fact, there’s a folder called ‘source’ into the main directory that contains an HTML file for each class.
How they do that?

Thanks in advance.
Wilk

  • 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-06-03T22:56:05+00:00Added an answer on June 3, 2026 at 10:56 pm

    Ok, I found the solution by myself 😛

    Well, this kind of thing could be done by the following way:

    HTML part

    <!DOCTYPE html>
    <html>
    <head>
        <title>Stackoverflow</title>
        <link rel="stylesheet" type="text/css" href="../extjs-4.1.0/resources/css/ext-all.css"/>
        <script type="text/javascript" src="../extjs-4.1.0/ext-all.js"> </script>
        <script type="text/javascript" src="sof.js"> </script>
    </head>
    <body>
        <a href="#!photos.html">Photos</a>
        <a href="#!info.html">Info</a>
        <a href="#!aboutme.html">About Me</a>
    
        <div id="results"></div>
    </body>
    

    Javascript part, done with ExtJS framework (sof.js)

    // Loads each HTML part with an AJAX request
    function loadAnchor (url) {
        Ext.Ajax.request ({
            url: url ,
            success: function (res) {
                // Edits results div with the new HTML part
                var r = Ext.get ('results');
                r.dom.innerHTML = res.responseText;
            }
        });
    }
    
    
    Ext.onReady (function () {
        var anchors = document.getElementsByTagName ('a');
    
        Ext.each (anchors, function (a) {
            a = Ext.get (a);
            // Attaches to each anchor the following function on click event
            a.on ('click', function (ev, anchor) {
                // Splits the hash, keeping the HTML requested
                var url = anchor.getAttribute('href').split('#!')[1];
                loadAnchor (url);
            });
        });
    
        // This is done without clicking an anchor, but by inserting directly the full URI
        // E.g.: http://www.mydomain.com/webapp/index.html#!info.html instead of clicking the anchor Info
        var url = document.location.hash.split('#!')[1];
        loadAnchor (url);
    });
    

    As you can see, each anchor is bound with a javascript function that loads the requested resource by an AJAX request.
    Then, a certain container (a div, for example) is modified with the response (maybe HTML code or JSON, XML, etc…).

    However, this thing has to be done with a server web like Apache but without a server application: in fact, each resource can be a pure HTML file and no server app is needed to serve those file.

    For further details, see:

    1. Anchored based URL navigation
    2. Making AJAX Applications Crawlable
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using ASP.NET MVC to develop a web application, deploying to IIS 7. I've
Is there any way to develop web-service base application using third party json which
I´m using internet explorer 8 and asp.net mvc 3 to develop my web application.
I am using ASP.NET MVC to develop a web application and would like to
I'm, using MVC to develop a Web application, and I need to use nested
I'm going to develop a web application using SmartGWT. I've heard about Vaadin framework.
We are planning to develop a web based application using Silverlight 2.0. The application
I am about to develop a sort of web application using only static files
I am using eclipse to develop a web application. Just today I have updated
I'm using Ruby on Rails to develop a web application. I have a wiki

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.