Jump to content

How to open different urls in IE in different tabs and not in different windows


Recommended Posts

I have designed an App using Koda wherein I have different buttons for different URLs. The problem is every url opens in different window and not in different tabs. Please suggest me the entire code to check if there in an open window in IE, then open the next url in next tab and if not then open a new window.

 

Thanks in advance.

 

Link to comment
Share on other sites

Thanks for your reply and time for my query but I don’t know whether I am able to explain my question or not.

It is user dependent as may be this happens that when the user is clicking on a particular button, then IE is not there, in that case we have to open a new window 

But when IE is opened maybe in his/her second, third... attempt then we need to attach a new tab to the existing window.

And i am sorry but I didn’t understand this code and particularly this:

Const $navOpenInNewTab = 0x0800
 
Link to comment
Share on other sites

That line just declares a constant, which is then used in the subsequent command. You should be able to do something like this to determine if the browser is already active --

$oIE = _IEAttach("", "instance", 1)

If IsObj($oIE) Then
    ; Open new tab
    $oIE.Navigate2('http://google.com', $navOpenInNewTab)
Else
    ; Launch browser
    $oIE = _IECreate("google.com")
EndIf

 

 

Link to comment
Share on other sites

How can I be so stupid!! This code is exiting abruptly and I could not figure out what's actually goes out missing.

Is there any problem with : $oIE = _IEAttach("", "instance", 1)

However, I tried this code,it is running successfully in new tab but at the beginning it creates a blank tab which looks wierd.

$navOpenInNewTab = 0x0800
$navOpenInBackgroundTab = 0x1000
$oIE = ObjCreate("InternetExplorer.Application")
$oIE.Visible = True
$oIE = __IENavigate($oIE, "www.google.com", 0, 0x800)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...