Hi guys,

I have a simple authentication portal that when a user's code renders valid, it redirects to a link and it loads my website. However, I need to auto open two websites. The second website that need to open upon authentication could open in another tab or it could launch another browser to open.

I a newby in html and I need a little help...

Thanks alot!

Rom

Take a look at this about the trick to open url in different ways using window.open() method of javascript.

these are four options to open url
_blank :The url is loaded into a new, unnamed window.
_parent :The url is loaded into the current frame's parent. If the frame has no parent, this value acts as the value _self.
_self :The current document is replaced with the specified url.
_top :The loaded url replaces any framesets that might be loaded. If there are no framesets defined, this value acts as the value _self.

<html>
<script type="text/javascript">
function open_in_new_tab(url )
{
  var win=window.open(url, '_blank');//open new url
  win.focus();//focus the newly opened url
}
</script>
<input type="button" onclick="open_in_new_tab('http://www.google.com')">
</html>

Thanks IIM for your great information..this is very easy step that i got quick understand.i like your explanation

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.