In the original Javascript is there I want this to stop it
setTimeout('open_popup()', 200);
What is function To stop this from another file js
setTimeout returns a handle that you can use the clear the timeout:
var timer = setTimeout(open_popup, 200);
clearTimeout(timer);
That of course assumes you put the timer variable in a scope that is accessible to both scripts and that you clear the timeout before it fires.
setTimeout(), and not a string to be eval()d. Using eval() (or any other function that internally eval()s code) is usually considered a bad practice. See stackoverflow.com/questions/86513/…
setTimeout, it will beevaled.setTimeoutexpects a function as a first parameter, so you'll be fine just usingsetTimeout(open_popup, 200).