css - adding javascript settimeout function -


i not coder/programmer , found script use , used wysiwyg editor try make work best could, still not work way want maybe me.

the script:

<script type="text/javascript"> <!-- redirecttime = "5000"; redirecturl = "http://somesite.com"; function timedredirect() {  settimeout("location.href = redirecturl;",redirecttime);  } //   --> </script>  <textarea name="textarea1" id="textarea1" onblur="timedredirect() ;return false;"    style="position:absolute;left:200px;top:390px;width:108px;height:108px;z-index:1;" rows="3" cols="9"></textarea> 

with this script trying add alert box it, script works (found online), when try add alert triggers automatically not after timer goes off. should trigger same time script. show go alert box, url redirect @ specified settimeout.

if great. tried scripted them work best of ability , not able if put edited version of trying accomplish great.

var redirecttime = 5000; var redirecturl = "http://somesite.com";  function doredirect() {     alert("we're redirect!");     window.location.href = redirecturl; }  function timedredirect() {     settimeout(doredirect, redirecttime); } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -