Note that there are some explanatory texts on larger screens.

plurals
  1. PODynamically change the HTML source using native JavaScript?
    primarykey
    data
    text
    <p>I was trying to change my HTML files. Please see <a href="https://stackoverflow.com/questions/7564577/how-to-remove-attributes-from-html-using-javascript/7564606#7564606">this</a> to get a better understanding of what I am up to.</p> <p>Every thing worked fine but as I viewed the source it was not changed. The changes I was trying to make were only reflected on the web-page I had opened on my browser.</p> <p><strong>Is it by any way possible to change the actual source of the HTML page?</strong></p> <p>I am using IE8 and GreaseMonkey4IE to run my JavaScript on the web pages I want to manipulate, just in case you are interested.</p> <p>There is a similar question <a href="https://stackoverflow.com/questions/2404472/why-would-html-source-not-change-when-the-dom-is-updated-dynamically">here</a>. But I have my HTML files at my local storage. No server side - client side technicalities. <br><br> <strong>EDIT 1</strong> <br></p> <p>Well I do have setup Tomcat but it is all in my local machine.<br> Also if I can modify the DOM can't I save it as a new HTML file, this way I won't have to mess with the original source file.<br><br> This is how we do it <a href="https://stackoverflow.com/questions/2184862/saving-the-manipulated-dom-html-after-editing-it-with-firebug/2194853#2194853">in firefox</a>. There must be some way to do it in IE8. <br><br> <strong>EDIT 2</strong><br> Now it is <strong>working fine for the HTML pages without any frames</strong>. But when I am trying this on pages with frames it is not working.It is going to kill me i am sure. Perhaps this is because frame access other HTML pages. For example : <br></p> <pre><code>&lt;frameset rows="95,*" frameborder="NO" framespacing="0" border="0" marginwidth="0" marginheight="0"&gt; &lt;frame name="title" target="content" src="Strategy%20Details.asp_files/title.htm" scrolling="NO"&gt; &lt;frameset cols="168,*"&gt; &lt;frame name="navigation" noresize="noresize" width="168" target="content" src="Strategy%20Details.asp_files/navigation.htm"&gt; &lt;frame name="content" noresize="noresize" src="Strategy%20Details.asp_files/home.htm"&gt; &lt;/frameset&gt; &lt;/frameset&gt; </code></pre> <p><br><br> See how the frames are accessing the HTML pages in <strong>src</strong> attribute.<br><br> <strong>Any Idea ???</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload