Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / April 2006

Tip: Looking for answers? Try searching our database.

How to Change Font Color of a textbox in Jscript

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
tvanhammond@gmail.com - 12 Apr 2006 23:28 GMT
I have been attempting to change the font color of a text box on an
InfoPath form but I need to do this in jscript.  Is this possible?
Ben Walters - 13 Apr 2006 06:38 GMT
Yes this is possible I had to do the same thing for a client who wanted to
track what fields had been chaged.
This is a little limited though,
Add an attribute to the field that you want to change the colour of
then for the text box of the field set a conditional formatting rule that
will check the new attribute you added and based on the value in the
attribute change the font colour.

As I said this a limited approach, but may be a good starting point for you

Cheers
Ben Walters

> I have been attempting to change the font color of a text box on an
> InfoPath form but I need to do this in jscript.  Is this possible?
eComTim - 14 Apr 2006 14:11 GMT
Thanks Ben.  Just to be clear..when you say to 'Add an attribute', what
do you mean?   I've added a separate textbox which I can alter the
contents of but I'm not sure what type of Attribute you intended.

Thanks again

Tim
Ben Walters - 18 Apr 2006 00:08 GMT
Hey Tim,
When adding fields to the xml structure of the form you have an option to
select one of the following

- Field
- Group
- Group (Choice)
- Field (Attribute)
- Complete XML Schema or Document

the reason I suggested adding an attibute is that you could create an xml
structure as follows

<root>
<UserName ColourAtrtibute=""></UserName>
</root>

this way if you need to reuse the same attribute name for a number of fields
you can rather than requireing unique names for something that is essentially
a property of a field.

Hope this helps

Cheers
Ben

> Thanks Ben.  Just to be clear..when you say to 'Add an attribute', what
> do you mean?   I've added a separate textbox which I can alter the
[quoted text clipped - 3 lines]
>
> Tim
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.