How are you all? 
I am using JS script to save KM variables.
<p class="input1"><textarea class="txta3" id="salary" rows="3" cols="100">00000</textarea></p>
However, there is a iframe in the textarea field.
<p class="input1"><iframe class="txta3" id="content" width="720" height="300" src="/source.php?a="></iframe></p>
source.php outputs some HTML code.
Is there anyway to save the iframe HTML code?
(function() {
return document.querySelector('#content').value;
})();
This is not working.
Thank you all the time. 
I have changed from iframe to Ajax and solved 
Thank you!
1 Like
Heeeyyyy.
How are you doing, @ccstone ?
Long time no see.
Remember me? you helped me a lot and also learned a lot from you.
Ajax is just much better than iframe.. and works fine.
I am trying to solve another problem and found one of your answers.. and almost solved. hehe.
Thank you!! all the time!!
1 Like
<div id="content_ajax"></div>
<script type='text/javascript'>
$(document).ready(function (){
var pid = document.querySelector('#post_id').value; // Get the post id. you don't need if you have to pass.
$('#content_ajax').load('posts.php?pid='+pid); // you don't need if post id is not needed.
});
</script>
After that I used the same code.
(function() {
return document.querySelector('#content_ajx').value;
})();
I think I understand what you mean
to leave the solution to help others.
Thank you again!!!
1 Like