Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PostToNewWindow() {
- var originalTarget = document.forms[0].target; // Note the var!
- document.forms[0].target = '_blank';
- window.setTimeout(function() { // Use a function with setTimeout,
- document.forms[0].target = originalTarget; // not least so it has access to
- }, 600); // local vars like `originalTarget`.
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement