-8

I have created a dynamic html page and I open it in home.html page by clicking on open the content of dynamic html page in text editor. When i edit the content in text editor i want those changes to appear in the dynamic html page automatically

I have created dynamic html page content

<h1>This is my first content</h1>
<h2>This is my first content</h2>
<h3>This is my first content</h3>
<h4>This is my first content</h4>
<h5>This is my first content</h5> 

AND i opened in home.html

$(function () {
    load_home();
});
function load_home() {
     document.getElementById("content").innerHTML='<object style="width:100%; height:1000px; overflow-y:hidden;" type="text/html" data="Responce.html" ></object>';
}

AND i opened the content in iframe by click on edit button

<iframe id="texteditor" src="Responce.html" name="texteditor" style="width: 100%; height: 74%;"></iframe>

When i edit the content in text editor i want the changes to show in the dynamic html page automatically.

Chase
  • 9,289
  • 5
  • 51
  • 77
  • 1
    are we supposed to code ? – Hash Nov 29 '17 at 10:44
  • 4
    first of all: https://stackoverflow.com/help/how-to-ask If you want all code, maybe you want to hire someone – Calvin Nunes Nov 29 '17 at 10:46
  • 1
    Possible duplicate of [How to redirect to another webpage?](https://stackoverflow.com/questions/503093/how-to-redirect-to-another-webpage) – Troyer Nov 29 '17 at 10:46
  • Refer this [link](https://stackoverflow.com/q/8988855/7105338). It might be possible solution for your question. –  Nov 29 '17 at 10:54
  • Hi, welcome to Stack Overflow, please take the time to read the [tour] along with [ask] and [help/on-topic]. – freedomn-m Nov 29 '17 at 10:58

1 Answers1

0

you can use the location object to redirect to a page within JS:

window.location.href = "/redirect.html";

not sure what do you mean in your second sentence though, redirecting to a page means that the page you are redirecting from gets unloaded.

In case you want to just open a window and write some text into it without redirecting anything, you can use window.open instead:

var myWindow = window.open();
myWindow.document.write("<your text>");
subject42
  • 51
  • 5