0

This is a javascript function through which i call iframe. But what i want is before i call an iframe i refresh or call or update the contents of a div

<script type="text/javascript">
        function refreshConversatio() {

            document.getElementById('iframeDisplayMessage').src = 'frmMessageDisplay.aspx?id=' + document.getElementById('val').value+'&id1=' + document.getElementById('HiddenTime').value,
            document.getElementById('iframe1').src = 'frmChatRequest.aspx',
            document.getElementById('iframe2').src = 'PendingChat.aspx';


        }

    </script>

This is the div

<div id="divItem">
     <input type="hidden" runat="server" id="val"  name="val" />
      <input type="hidden" runat="server" id="HiddenTime" name="HiddenTime" />  
</div>

and this is the function

<script type="text/javascript">
        setInterval(function () { refreshConversatio(); }, 3000)


    </script>
Mangal Pandey
  • 109
  • 13
  • your requirement is not so clear to me, do you want to update DOM under div (id="divItem") before calling the function "refreshConversatio()" ? – Anand Jha Oct 24 '13 at 09:53
  • yes thats wat i want refresh the value of hidden field before calling the function – Mangal Pandey Oct 24 '13 at 10:08
  • if you want to update DOM at client side(using javascript) the wrire the code inside setInterval Callback function before calling refreshConversatio()---- setInterval(function () { --*write here*-- refreshConversatio(); }, 3000)---- – Anand Jha Oct 24 '13 at 10:15
  • You may find some help here. http://stackoverflow.com/questions/914951/show-and-hide-divs-at-a-specific-time-interval-using-jquery – Digvijay Verma Oct 24 '13 at 10:15

0 Answers0