Text Box Events - InfoPath Dev
in

InfoPath Dev

Text Box Events

Last post 12-05-2005 11:42 PM by franck. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 12-05-2005 09:16 AM

    Text Box Events

    Hey All,
    I am looking to insert strings into a rich text box by the event of a enter + another keystroke so when a user goes to the next paragraph they will have a portion marking at the begining. I have tried a few different ways of doing this and have run into a few problems.

    First, I am not finding a class that lets infopath throw a event on the enter button. I know jscript does it but uses classes included from IE and I have been unsuccessful in using any of that in the infopath script file.

    Second, how to insert data into the rich text box. Most methods I have come across allows you to edit stored XML data but to my knowledge the data is not stored in the xml till you leave the rich text box. I want the data to be inserted while they are typing before its saved to XML. I could be wrong but if anyone has any idea on these two hurdles, I would appreciate any help.
    Thanks!

  • 12-05-2005 08:52 PM In reply to

    OnAfterChange should do the trick.

    Rich text box insertion requires well formed xhtml. This is tricky and there have been many posts on it. Try searching the forum here or look at the Microsoft blog. I believe someone has done this, but I don't have the link handy.

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 12-05-2005 10:03 PM In reply to

    Thanks Patrick. I am not sure that even happens till they navigate away from the rich text box. Otherwise it would be writing to the xml on every keystroke but as usual i could be wrong.
  • 12-05-2005 11:42 PM In reply to

    Hi,

    Look into appendChild. Check this to get started:http://www.mcse.ms/archive180-2005-3-1490977.html

    Regards,

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