Running code from a hyperlink - InfoPath Dev
in

InfoPath Dev

Running code from a hyperlink

Last post 07-18-2005 01:43 PM by gds140. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-18-2005 08:41 AM

    • gds140
    • Not Ranked
    • Joined on 07-14-2005
    • Posts 5

    Running code from a hyperlink

    I was wondering if you could set up a link in infopath to execute a block of code when it is clicked... I imagine there is a way but it doesn't seem intuitive. Anybody know?
  • 07-18-2005 11:14 AM In reply to

    Re: Running code from a hyperlink

    Yes. In the Designer, you can double click on the button control and choose Edit Form code. This will bring up the script editor. To add .NET code, you'll want to create a project in Visual Studio using the InfoPath template. This is covered in Chapter 2 of our book.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 07-18-2005 12:30 PM In reply to

    Re: Running code from a hyperlink

    As far as I know we cannot write code for a hyperlink.
    When you add a Hyperlink to your InfoPath UI, <a> tag is added in the View.xsl file.
    for example when you add a hyperlink for hotmail the xsl that is created for that would be
    <a href="http://www.hotmail.com" xd:disableEditing="yes">www.hotmail.com</a>

    But one thing you can do is design your button in the form of a hyperlink, by removing background, underlining it, change color to blue. And you can have event for this button.

    Agni
    InfoPathDev India
  • 07-18-2005 01:43 PM In reply to

    • gds140
    • Not Ranked
    • Joined on 07-14-2005
    • Posts 5

    Re: Running code from a hyperlink

    Thanks Agni, that should work fine.
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.