May 2007 - Posts - Matt Faus

InfoPath Dev

Matt Faus

May 2007 - Posts

  • 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.



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




          This should be red.




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



          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.

Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.