Guest User

Untitled

a guest
Nov 20th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. var iframe = document.getElementById('youriframe');
  2. iframe.src = iframe.src;
  3.  
  4. document.getElementById('FrameID').contentWindow.location.reload(true);
  5.  
  6. document.getElementById('YOUR IFRAME').contentDocument.location.reload(true);
  7.  
  8. var f = document.getElementById('iframe1');
  9. f.src = f.src;
  10.  
  11. <td><iframe name="idFrame" id="idFrame" src="chat.txt" width="468" height="300"></iframe></td>
  12.  
  13. window.onload = function(){
  14. setInterval(function(){
  15. parent.frames['idFrame'].location.href = "chat.txt";
  16. },1000);}
  17.  
  18. var iframes = document.getElementsByTagName('iframe');
  19. var yourIframe = null
  20. for(var i=0; i < iframes.length ;i++){
  21. var source = iframes[i].attributes.src.nodeValue;
  22. if(source.indexOf('/yourSorce') > -1){
  23. yourIframe = iframes[i];
  24. }
  25. }
  26. var iSource = yourIframe.attributes.src.nodeValue;
  27. yourIframe.src = iSource;
  28.  
  29. window.addEventListener('change', function(e) {
  30. if (e.data === 'Please reload yourself') {
  31. var skipCache = true; // true === Shift+F5
  32. window.location.reload(skipCache);
  33. }
  34. }
  35.  
  36. var iframe = document.getElementById('my-iframe');
  37. var targetOrigin = iframe.src; // Use '*' if you don't care
  38. iframe.postMessage('Please reload yourself', targetOrigin);
  39.  
  40. function reloadFrame(iFrame) {
  41.  
  42. iFrame.parentNode.replaceChild(iFrame.cloneNode(), iFrame);
  43.  
  44. }
  45.  
  46. iframe.src = iframe.src;
  47.  
  48. iframe.src = iframe.src.split("?")[0] + "?_=" + new Date().getTime();
  49.  
  50. var wasSrc = iframe.src
  51.  
  52. iframe.onload = function() {
  53. iframe.onload = undefined;
  54. iframe.src = wasSrc;
  55. }
  56.  
  57. iframe.contentWindow.location.reload();
  58.  
  59. function refreshFrame(){
  60. $('#myFrame').attr('src', "http://blablab.com?v=");
  61. }
  62.  
  63. `<iframe id="myFrame" src=""></iframe>`
Add Comment
Please, Sign In to add comment