What is the best way to efficiently load all of my web applications within the web application that I am currently developing?

https://i.stack.imgur.com/IAjIW.png

Greetings! I am currently a novice Web Developer and here is my current situation:

I am working on developing 3 web applications, with one additional application that will load all three of them. Please refer to the image provided. My goal is to have "App A" load in the red area when "button A" is clicked (most likely achieved through Ajax), although I am open to any better alternatives if you have suggestions.

Answer №1

If you were to look at this specific code along with these jQuery elements, it demonstrates how you can modify the src attribute of the iframe to display various websites:

$("#b1").click(function(){
  $("#target").attr("src","https://jquery.com/")
});
$("#b2").click(function(){
  $("#target").attr("src","https://nodejs.org/en/")
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button id="b1">site1</button>
<button id="b2">site2</button>
<iframe id="target"></iframe>

It's worth noting that some websites, including SO, have implemented measures to prevent their content from being loaded into an iframe, so keep that in mind.

Answer №2

If you're looking to incorporate modern technologies into your development, consider using AngularJS. It's highly effective for various front-end development scenarios.

In your situation, utilizing Angular routing can help load different views when a menu item is clicked. Take a look at this resource:

https://docs.angularjs.org/tutorial/step_07

Make sure to start with the initial tutorial first. Once you've completed it, you'll no longer be considered a 'newbie' in AngularJS :)

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can I use PHP to update and select on the same page simultaneously?

Having always been able to do something similar in other languages, I'm facing a few difficulties with PHP. My goal is to load a page that displays all the values from a form (created with a SELECT) and then update them all when clicking a "CHANGE" bu ...

jQuery modal fails to display

I am currently experiencing an issue with my jQuery dialog that is not displaying after clicking a radio button. Previously, the dialog was showing properly, but after implementing some script for submitting from the dialog, it stopped showing up when th ...

Find the string located between two specific strings using the preg_match function

I am attempting to use a preg_match function in PHP to extract a URL string located between two specific strings. However, I am encountering an issue where I am unable to retrieve any data from it. preg_match( "/\[(gmap)\](.*?)\[\/(gma ...

Revise a function that locates an object with a corresponding id in an array, modifies a property, and updates a React component's state

Here is a function that takes in a rating value within an object. The ID and Question properties remain unchanged, but the rating value can be updated. This will result in updating a React state value. Is there a method to improve the readability and con ...

Utilizing React forwardRef with a functional component

Looking at my code, I have defined an interface as follows: export interface INTERFACE1{ name?: string; label?: string; } Additionally, there is a function component implemented like this: export function FUNCTION1({ name, label }: INTERFACE1) { ...

A more efficient method for passing a function as an argument using the keyword "this"

When it comes to passing a function as an argument that uses the this keyword, is there a preferred method or correct way to do so? An example would be helpful in understanding this concept better: For instance, if I want to fade out an object and then r ...

Using Vuex to calculate the percentage of values within an array of objects and dynamically updating this value in a component

I'm currently in the process of developing a voting application with Vuex. Within the app, there are buttons for each dog that users can vote for. I have successfully implemented functionality to update the vote count by clicking on the buttons: sto ...

Executing PHPUnit 8.5 on various directories

When I try to execute all test files in a directory by running phpunit tests/path/to/directory, it works fine. However, if I attempt to run two directories containing test files using the command phpunit tests/path/1 tests/path/2, where 1 and 2 are direc ...

Is there a way to prevent ng-template-loader from scanning image src's?

Currently, I am beginning to incorporate webpack into my development workflow for an angular project. To create my templateCache, I have had to include the ng-template-loader. Below is a snippet of my webpack configuration: { test: /\.html$/, loa ...

What steps should I follow to effectively store this JSONB data in PostgreSQL by utilizing node-postgres (pg)?

After receiving information in the GET URL, I need to pass it into JSON format and save it with increasing IDs into a PostgreSQL database. However, the code I wrote does not seem to be saving anything without any errors: // Initializing Pg const { Client ...

Utilize AJAX to verify the content of a PHP variable within a Wordpress environment

After attempting multiple approaches without success, I am seeking advice from anyone who has experience with this particular issue. I have developed a custom post type that generates Public pages. However, I require certain information to only be accessi ...

Is there a problem encountered when attempting to pass an array value as a string using props in Vue.js?

<template> <div> <div v-for="piza in pizas" :key="piza.pname"> {{ piza.pname }} <List :content="matchpizza" :pname="piza.pname" :qname="quantitys.qname" /> </div> </div> </template> <scr ...

The styles from the npm package are not being properly applied to the class

After creating my react npm package using webpack, I encountered an issue where the styles from the package were not being applied to classes when installed in my react project. I used style-loader in my webpack configuration, but kept getting errors sayin ...

Revamping the login interface for enhanced user

Whenever I attempt to login by clicking the login button, there seems to be an issue as it does not redirect me to any other page. Instead, I am left on the same page where I initially clicked the button. The intended behavior is for users to be redirected ...

Positioning a Material UI Menu item underneath its parent element using CSS styling

I have created a Material UI dialog that features some text and an Icon with a dropdown menu option. You can check out the demo here: https://codesandbox.io/s/prod-rain-1rwhf?file=/src/App.js My goal is to properly position the Menu component so that it a ...

Troubleshooting the issue of process.nextTick not being recognized in Calgolia places.js

After successfully implementing Algolia's places.js in my Angular 7 project using NPM, I encountered an issue. I have integrated a form where one of the fields should be an input. <form [formGroup]="myForm"> <pre style="color: white; b ...

Having issues when dynamically adding options to a multiselect dropdown

I'm working on dynamically adding options to a multiselect using AJAX: <select size='2' name="CraftCode" id=@ccrf class="form-control js-select manualentrydd" ></select> $.ajax({ type: "GET", url: "GetCraftCodes", data: ...

Unusual syntax in Symfony framework

I am currently working on a new project for a website using the Symfony3 framework, and I have encountered an issue with understanding the syntax in Twig: <li><a href="{{ path('contact') }}">{{ 'site.template.menu.contact'| ...

"Enhance your Angular experience with SweetAlert integration using directives and translation

Currently, I am utilizing the Angular implementation of the SweetAlert plugin from GitHub. I am attempting to pass an Angular directive with translation to the title. The variable being passed as the title is: {{ 'register.confirmation_modal.SUPERI ...

modify the URL records within the GetJson function

My current address is "http://localhost:8000/index", and when I execute the following jQuery code: $.getJSON("1",function(data) { .....code }); It redirects to "http://localhost:8000/index/1". This works fine for now. ...