0

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

3
Contributors
2
Replies
21
Views
4 Years
Discussion Span
Last Post by advaanz
1

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>
0

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

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.