Not working in IE8 + Windows 7

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

Not working in IE8 + Windows 7
 
Jagdish Yadav




Posts: 22
Joined: 2009-03-25
In the below given code, I have marked the code lines that handles the onClick. When user clicks on the add-in button, the code gets executed.

private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.adxieCommandItem1 = new AddinExpress.IE.ADXIECommandItem(this.components);
this.adxiehtmlDocEvents1 = new AddinExpress.IE.ADXIEHTMLDocEvents(this.components);
this.adxieCommandItem1.ActiveIcon = "Icons.SmartIt";
this.adxieCommandItem1.InactiveIcon = "Icons.SmartIt";
this.adxieCommandItem1.OnClick += new AddinExpress.IE.ADXIECommandClick_EventHandler(this.adxieCommandItem1_OnClick);
this.adxieCommandItem1.Caption = "Smart it";
this.adxieCommandItem1.CommandGuid = "{C663CBF2-DFCD-473C-A576-5855D89969A1}";
this.adxieCommandItem1.ShowInMenu = AddinExpress.IE.ADXIECommandMenuType.cmtNone;
//
// IEModule
//
this.Commands.Add(this.adxieCommandItem1);
this.ModuleName = "MyIEAddon1";

this.DocumentComplete += new AddinExpress.IE.ADXIEDocumentComplete_EventHandler(IEModule_DocumentComplete);
}



void adxieCommandItem1_OnClick(object sender, object htmlDoc)
{

try
{
mshtml.HTMLDocument doc = this.HTMLDocument;

if (doc != null)
{
string documentUrl = "";
string documentTitle = "";
string documentSelectedText = "";
documentUrl = doc.url.ToString();
documentTitle = doc.title.ToString();

mshtml.IHTMLTxtRange myTextRange = (mshtml.IHTMLTxtRange)doc.selection.createRange();
if (myTextRange.text != "" && myTextRange.text != null)
documentSelectedText = myTextRange.text.ToString();

string navigateURL;
navigateURL = "http://172.26.132.207:8080/G2Collabo/user/tagit.do"; //MANZAR


string rssLinks = getRssLinks(doc);

string PostDataStr = "url=" + documentUrl + "&title=" + documentTitle + "&teaser=" + documentSelectedText + "&rss=" + rssLinks;
byte[] PostDataByte = System.Text.Encoding.UTF8.GetBytes(PostDataStr);
string AdditionalHeaders = "Content-Type: application/x-www-form-urlencoded" + Environment.NewLine;

System.Object one = "_SELF";
System.Object two = "new";
System.Object three = PostDataByte;
System.Object four = AdditionalHeaders;

IEApp.Navigate(navigateURL, ref one, ref two, ref three, ref four);

}
}
catch (Exception)
{

}

}
Posted 15 Dec, 2009 22:30:32 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Posted 16 Dec, 2009 09:21:33 Top
christianbpedersen




Posts: 34
Joined: 2009-07-19
Isn't this the same issue as http://www.add-in-express.com/forum/read.php?FID=10&TID=6541 ?

- Christian
Posted 26 Dec, 2009 17:03:15 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Christian.

Yes, this is the same bug.
Posted 05 Jan, 2010 08:49:53 Top
christianbpedersen




Posts: 34
Joined: 2009-07-19
OK, so what do we do? You're not giving useful answers to either topic.
Posted 05 Jan, 2010 08:58:59 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
We will publish a new version of the product next week.
Posted 05 Jan, 2010 09:16:11 Top
christianbpedersen




Posts: 34
Joined: 2009-07-19
Hi Sergey,

Build 263 didn't fix this problem either. You wrote earlier, that you could reproduce this problem on IE8. Did you successfully run the scenario with build 263?

The below is the fundamental parts of my test code:

private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.adxieCommandItem1 = new AddinExpress.IE.ADXIECommandItem(this.components);
//
// adxieCommandItem1
//
this.adxieCommandItem1.ActiveIcon = "Icons.SampleIcon2";
this.adxieCommandItem1.Caption = "adxieCommandItem1";
this.adxieCommandItem1.CommandGuid = "{92C824A6-2ACD-4B79-9AE9-EF5287806EEC}";
this.adxieCommandItem1.HelpText = "ABC";
this.adxieCommandItem1.InactiveIcon = "Icons.SampleIcon2";
this.adxieCommandItem1.OnClick +=new AddinExpress.IE.ADXIECommandClick_EventHandler(adxieCommandItem1_OnClick);
//
// IEModule
//
this.Commands.Add(this.adxieCommandItem1);
this.ModuleName = "MyIEAddon4";
}

void adxieCommandItem1_OnClick(object sender, object doc)
{
MessageBox.Show("Test");
}

I would expect the above to produce a command item with a smiley in it, which it does, and a messagebox "Test" when clicked, which it doesn't.

Hopefully, something is wrong with my code...

Christian
Posted 19 Jan, 2010 16:46:30 Top
Sergey Grischenko


Add-in Express team


Posts: 7202
Joined: 2004-07-05
Hi Christian.

Yes, the code above worked fine on my PC.
Did you enable the 'Allow active content to run in files on My Computer' option in the IE Internet Options dialog (see Tools -> Internet Options -> Advanced) ?
Posted 20 Jan, 2010 11:00:02 Top
christianbpedersen




Posts: 34
Joined: 2009-07-19
Hi Sergey,

No, but I did that just now. Restarted IE, rebuilt the component, unregistered it and registrered it again.

When I click the icon, IE looses focus for a brief moment, and then gains focus again. But no message box.

What else can I try?

- Christian
Posted 20 Jan, 2010 11:09:33 Top
Andrei Smolin


Add-in Express team


Posts: 14675
Joined: 2006-05-11
Hi Christian,

Try using a MessageBox.Show(IWin32Window, String, ...) overload. Use the ParentHandle property of the module to provide the hwnd for a class that implents IWin32Window.

Regards from Belarus (GMT+2),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Jan, 2010 11:36:44 Top