Background-image only shows in Design Mode - InfoPath Dev
in

InfoPath Dev

Background-image only shows in Design Mode

Last post 10-13-2005 07:10 AM by franck. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 10-12-2005 07:50 PM

    Background-image only shows in Design Mode

    I am trying to set a background image for the entire form. To do this, I have extracted the form and edited the body tag in view.xsl to be:

    <body style="background-image:url([Absolute Path]\blue_gradient_background.gif);">

    When I then open the form in design mode the background image appears. However, when I preview or open the form to add data the background does not show.

    Am I doing something wrong, or is this a weird bug in InfoPath?

    Thanks
  • 10-12-2005 10:35 PM In reply to

    Re: Background-image only shows in Design Mode

    Hi,

    It is because you are missing a reference to yor gif in your manifest.xsf.

    If you have a gif called: aa.gif.

    In the xsl, you should have (as you did): body style="background-image:url('aa.gif')"

    Then, in your manifest, you should add:
    <xsf:file name="aa.gif">
    <xsf:fileProperties>
    <xsf:property name="FileType" type="string" value="resource"></xsf:property>
    </xsf:fileProperties>
    </xsf:file>

    and you need to copy your gif locally....

    Hope that it helps.

    Regards,

    Franck Dauché
  • 10-13-2005 06:51 AM In reply to

    Re: Background-image only shows in Design Mode

    Franck,

    Many thanks for the tip. That did work.

    Do the resource files have to be local or could load them from a Web site? IE, would this work:
    <xsf:file name="http://www.infopathdev.com/images/IPDLogo.gif">
  • 10-13-2005 07:10 AM In reply to

    Re: Background-image only shows in Design Mode

    Hi,

    I don't believe that you can. But, I won't bet my life on it!

    Franck Dauché
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.