Improve company productivity with a Business Account.Sign Up

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

How to get JavaScript redirect to open new URL in new browser window

Hi,

I have the following code in the head of my HTML page:
-----------
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
redirTime = "5000";
redirURL = "http://www.ddk.co.uk";
function redirTimer() { self.setTimeout("self.location.href = redirURL;",redirTime); }
//  End -->
</script>
-----------
Please can someone tell me how I set the redirect URL to open in a new browser window rather than over the top of the current page? Can't figure it out!

Many thanks
0
gjirvine3000
Asked:
gjirvine3000
  • 2
1 Solution
 
ColosseoCommented:
Hi there

try changing your function to this

function redirTimer() { self.setTimeout("window.open(redirURL,\"child\");",redirTime); }

this will open the redirURL into a new window

HTH

Scott
0
 
gjirvine3000Author Commented:
Cheers Scott, works a treat! :-)
0
 
ColosseoCommented:
No bother mate

thanks for the grade :)

Cheers

Scott
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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