InfoPath bug with linking external files from custom task pane HTML - Matt Faus
in

InfoPath Dev

Matt Faus

InfoPath bug with linking external files from custom task pane HTML

While working on the Catalog Base Form for DBXL, I nearly went nuts trying to debug why my <link> tags were not working in the task pane.  I had the file included as a form resource file, and when I opened the HTML file directly from Internet Explorer, everything was rendered correctly.  However, when InfoPath wrapped everything up into an XSN on publish, it simply broke!  After talking with a few colleagues and noting that they were having the same problem, I decided to e-mail my contacts at Microsoft.

 

It turns out that this is indeed a bug, but not exactly in InfoPath.  InfoPath takes advantage of the Internet Explorer engine to render all of its HTML.  So, if you have are running Internet Explorer 7 and have updated it within the past month or so, you will be able to reproduce this bug.

A KB article along with an IE hotfix are in the works to resolve this issue, but I do not know when they will be complete.  As soon as I hear, I will post it up!

Here are the specific reproduction steps if you would like to try this out for yourself.

  1. Open a text editor, and then paste this code into a new file.

<html>

<head>

      <link rel="stylesheet" href="style.css"/>

</head>

 

<body>

      This should be red.

</body>

</html>

 

  1. Save the file as taskpane.htm
  2. Open a text editor, and then paste this code into a new file.

body

{

      color: red;

}

 

  1. Save the file as style.css, in the same folder as taskpane.htm
  2. Open Internet Explorer.
  3. From the File Menu, select Open, browse to the taskpane.htm file, and click Open

Note: File is opened and text is displayed as red.

 

  1. Open InfoPath and choose to design a new blank form.
  2. From the Tools menu, select Form Options.
  3. On the Advanced tab, select to enable the custom task pane, and then click Resource Files.
  4. Add the taskpane.htm and style.css files as Resource Files.
  5. Select taskpane.htm as the task pane location, and type test for the task pane name.
  6. Preview the form. 

Result: Task pane is displayed with black text.

Expected: The text should be red.

Comments

 

alvarohv said:

Could you get to IE hotfix??

September 7, 2009 10:17 AM
 

Ask démasquer les anonymes said:

InfoPath bug with linking external files from custom task pane HTML - Matt Faus

November 19, 2014 8:30 AM
 

http://iowebdesignlimburg.nl/ said:

InfoPath bug with linking external files from custom task pane HTML - Matt Faus

November 22, 2014 3:59 PM

About Matt Faus

Matt holds a BS in Computer Science and Software Engineering from the University of Texas at Dallas. During his studies, he helped Qdabra Software develop DBXL and InfoPath solutions. During that time he lived in Dallas, Seattle, and Valencia, Spain. He now works at Microsoft, developing for Hotmail.
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.