This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

iframe re-direct
#1
Hi i was wondering how you would re-direct an iframe url if the requested url is not accessible?

im currently using a dynamic iframe example as below and want to add a re-direct if the requested iframe url is not accessible or times out

Code:
$(function() {
  function seturl(url) {
    $('.iframeurl').find('iframe').attr('src', url);
  }

  $('.btn-1').on('vclick', function() {
    seturl('https://forum.logicmachine.net');
  });

  $('.btn-2').on('vclick', function() {
    seturl('http://openrb.com');
  });
})
Reply


Messages In This Thread
iframe re-direct - by Diggerz - 09.08.2020, 04:42
RE: iframe re-direct - by admin - 10.08.2020, 07:15

Forum Jump: