0

I am trying to reload a iframe once the page loaded (only once) In django template

Here is the my code

{% extends "base-3col.html" %}
<script>
    var iframe = document.getElementById('tr-main1');
    iframe.src = iframe.src;

</script>
{% block left_frame %}

    <iframe  name="tr-left" id="tr-left"
            class="tr-iframe"
            src="/left_frame/"
            onload="javascript:resizeIframe(this);"
            scrolling="yes"
            width="100%" frameborder="0">
    </iframe>
{% endblock %}<!-- left_frame -->

{% block middle_frame %}

    <iframe name="tr-main" id="tr-main1"
        class="tr-iframe1"
        src="/"
        onload="javascript:resizeIframe(this);"
        scrolling="n"
        width="100%" frameborder="0">
    </iframe>
{% endblock %}<!-- middle_frame -->

{% block right_frame %}
    <iframe name="tr-right" id="tr-right"
        class="tr-iframe"
        src="/right/"
        onload="javascript:resizeIframe(this);"
        scrolling="yes"
        width="100%" frameborder="0">
    </iframe>
{% endblock %}<!-- right_frame -->


{% block footer %}
    {% include "footer.html" %}

{% endblock %}<!-- footer -->

I don't know why the above javascript code is not working m also not getting any error

Please help me what might m doing wrong here .

I want second iframe should reload once again after the complete .

burning
  • 2,426
  • 6
  • 25
  • 38
  • 1
    have a look: http://stackoverflow.com/questions/86428/whats-the-best-way-to-reload-an-iframe-using-javascript – Ivan Chernykh Jun 23 '13 at 07:57
  • Perhaps tell us WHY you want to reload. Whenever I am asked how to reload something after load I immediately think there is a code smell and a reason to look at the process – mplungjan Jun 23 '13 at 08:00
  • the complete page content is coming in the iframe2 and when i am refreshing the page everything is comping up properly – burning Jun 23 '13 at 08:17

0 Answers0