On button click a PHP function is called where I use file_get_html() from Simple HTML DOM Parser to edit a form in the html file. I want to replace the current page with the edited DOM . I tried using javascript, document.write and window.open in various ways but it eitherappends the new page to current page or nothing happens.On button click a PHP function is called where