Make visible only on authenticated URL call and in child tabs

Add-in Express™ Support Service
That's what is more important than anything else

Only registered users are allowed to subscribe.
Make visible only on authenticated URL call and in child tabs
I have a web application and it will communicate with IE add on to scrape data from some sites. Webapp sending parameters along with login credentials in query string.Addon will validate and open interface.  
Sreebha Gopal




Posts: 9
Joined: 2017-11-20
1. First IEModule instance loaded when get an authenticated call from my Webapp (I know that visibility can handle by ADXIEadvanceBAr property) But from that 1st webpage when user open any link by right click and 'Open link in new tab 'then query string becomes empty on new tab

2. How do we pass params from parent tab to child tab when it opens?

3. How do we close single tab?
Posted 13 Dec, 2017 01:40:18 Top
Andrei Smolin


Add-in Express team


Posts: 14591
Joined: 2006-05-11
Hello Sreebha,

#1. I don't understand. Could you please explain in more details?
#2. I suggest that you check section IE Essentials, see the PDF file in the folder {Add-in Express}\Docs on your development PC. You can use GetModuleCount() and GetModuleXXX() methods to call a method in the module of the new tab. Or, you can use SendMessageXXX()
#3. IEApp.Quit()

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Dec, 2017 04:18:48 Top
Andrei Smolin


Add-in Express team


Posts: 14591
Joined: 2006-05-11
Hello Sreebha,

#1. It looks like you suppose there's a single ADXIEAdvancedBar shown for all tabs. This isn't so; every tab has a separate instance of your ADXIEAdvancedBar. You can use the ADXIEAdvancedBar.OnSynchronize event to initialize the ADXIEAdvancedBar instance's UI.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 13 Dec, 2017 04:34:59 Top
Sreebha Gopal




Posts: 9
Joined: 2017-11-20
From my Webapplication, say like i will call Amazon site for a price item check by Response.Redirect ("https://www.amazon.com/gp/search/?url=index%3Dblended&keywords=Toys+-
+Wagon&ID=123716&Quantity=1&Unitprice=90")

Browser window opens and My IEExtension tool will validate the ID from the URL and opens the extension interface and extension tool will scrape the data from amazon and send back to Webapplication when user verify the data from interface. But when user clicks on any link inside the amazon site or open any link on another tab, it will refresh the page and querystrings will be empty.

Scenario is almost like this topic (https://www.add-in-express.com/forum/read.php?FID=10&TID=11737)

So my main goal is whenever a new tab opened/ link clicked from the first IEModule instance, i need to pass query params.
Posted 15 Dec, 2017 19:15:08 Top
Andrei Smolin


Add-in Express team


Posts: 14591
Joined: 2006-05-11
Hello Sreebha,

At https://www.add-in-express.com/support/ie-vbnet-csharp.php, check the sample project titled "How to synchronize UI of a custom bar in all open IE tabs/windows".

HTH

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 18 Dec, 2017 05:08:41 Top
Sreebha Gopal




Posts: 9
Joined: 2017-11-20
Can we use this functionality for sending data on page navigation? This is the functionality what i needed but im not sure where should i call OnSynchronize event. Like i mentioned i need to pass data when user click any link from the webpage or open a new tab.
Posted 18 Dec, 2017 18:34:58 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Sreebha,

Yes, you can use this functionality to pass data between tabs. To pass serializable data you can use the 'Synchronize' method of the 'ADXIEAdvancedBar' class as shown in the example.
Posted 19 Dec, 2017 06:46:04 Top
Sreebha Gopal




Posts: 9
Joined: 2017-11-20
Its not working, definitely im missing something.

private void IEModule_DocumentComplete(object pDisp, string url)
{

BeginProcess(); // Doing Authentication and assigning values for some properties including GetXid()

ArrayList modules = ADXIEModule.GetModulesByTypeName(this.GetType().FullName);
if (modules.Count > 1)
{
string XId = string.Empty;
string _ThreadId = string.Empty;

foreach (ADXIEModule m in modules)
{
if (!string.IsNullOrEmpty(((IEModule)m).GetXid())) //
{
XId = ((IEModule)m).GetXid();
_ThreadId = ((IEModule)m)?.ThreadID.ToString() ?? string.Empty;
break;
}
}

if (this.MyAdvancedBarItem.BarObj != null && !string.IsNullOrEmpty(XId) && !(string.IsNullOrEmpty(_ThreadId)))
{
MyAdvancedBar objAdvanceBar = (MyAdvancedBar)this.MyAdvancedBarItem.BarObj;
objAdvanceBar.Synchronize("QueryParams", new object[] { _ThreadId, XId });
objAdvanceBar.Refresh();
}
}
}


Xid is empty when i tried to send. What would be the mistake im doing?

If you send me the mail address, i will send you the project code.
Posted 19 Dec, 2017 18:48:30 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Sreebha,

I don't see how do you process the OnSynchronize event. You can send me the code on the support e-mail: support@add-in-express.com
Posted 20 Dec, 2017 08:30:19 Top