Create link - InfoPath Dev
in

InfoPath Dev

Create link

Last post 08-01-2010 01:31 PM by Patrick Halstead. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-28-2010 04:16 AM

    Create link

    Hi. If i have a text on the form (the text may be in a text box for example) how can i transform it into a link which will open a new window using code? Thank you!

  • 08-01-2010 01:03 PM In reply to

     Hi, you can do an "on after change" event on you text box, build your URL in xhtml(<a href:"http:myURL"> Click here</a> and modify the innerXML on a Rich text field (if you use C# 2007), and make some conditionnal formatting on both. For your text field, you hide it when it's not blank, and your RT field, your hide it if it's blank.

    An easiest way is to add a button and launch an IE process of your URL: Process.Start("IExplore.exe", MyUrl);

  • 08-01-2010 01:31 PM In reply to

    You can do this without code. Just add a rule that sets a fields value based on concatenation of your text fields into the form of your URL (link address, for example http://<server>/<website>/<page.html>/ ). Then add that field to your view as a link and you can click on it to open a new window. If it's HTML it will open with no problem, if it's a DOC or XLS file, you'll want to use the file:// protocol instead of http://

    Patrick Halstead
    Project Manager at Qdabra
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.