[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 652
  • Last Modified:

Add time function to show intro javascript

Want to add a time duration function to the below script. On 5 seconds display then hide iframe.
<script>
function showintro() {
document.getElementById('if1').style.display='';
document.getElementById('if1').src='http://clubtuki.com';
}
</script>
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body onload="javascript:showintro()">
<iframe id="if1" src="" style="display:none;" scrolling="no" border="0" frameborder="0" height="250" width="500" marginwidth="0" marginheight="0">
</iframe>

Open in new window

0
jmanstorm
Asked:
jmanstorm
1 Solution
 
Michel PlungjanIT ExpertCommented:
add after
document.getElementById('if1').style.display='';

setTimeout("document.getElementById('if1').style.display='none';",5000)
0
 
jmanstormAuthor Commented:
How could I choose to display a div or new iframe in same location at the end of five seconds.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now