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 / October 2004

Tip: Looking for answers? Try searching our database.

Infopath Dropdown and Jcript questions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Installing W2003 on BM Infinity 4500R - 03 Oct 2004 20:19 GMT
I have developed an Infopath with jscript code behind for data manipulation
and validation. I'm not strong in Jscript. My questions are:

1. How can I either programatically or in design mode set the drop-down list
control to display the width of the dropdown panel wider than the lenght of
the control. The dropdown pane displays relatively long text entries, and I
want the dropdown pane to display more of the data.

2. How can I programatically close the Infopath application at the end,
after the user submits the form. I just don't know the appropriate jcript
statement.

Thanks,

Jose
Leon O'Brien - 04 Oct 2004 03:05 GMT
Hi Jose,

> 2. How can I programatically close the Infopath application at the
> end,  after the user submits the form. I just don't know the
> appropriate jcript  statement.

To close the InfoPath application, not just the form, you need have a fully trusted form.
Once you have that you can access the Application.Quit(false) method call within your script.

An alternate to closing the InfoPath application, and therefore not requiring fully trusted forms, is to select the option
to "Close the Form" after submitting to your server. This is an option selectable on the Submitting Options screen in the Submitting forms dialog.
Jerry Thomas [MSFT] - 04 Oct 2004 18:09 GMT
I don't think you can change the size of a control like you are asking for.
This might work for you though...

Insert an Expression Box under the Drop Down and link it to the Drop Down
field.
Drag the width to be the full width of the screen (or the widest you will
need).

Set Conditional Formatting on the Expression Box to hide it, if the length
of the value in the Drop Down is Less Than the number of characters that
show in your box.  You expression will look something like this:
string-length(my:field1) < 15. and then "click Hide this control"

So, if the selection in the Drop Down is "Ford", the Expression Box will not
show. If it is "Chevrolet - Monte Carlo", the entire entry would be
displayed.

Signature

Jerry Thomas[MSFT]
<Jerryth@online.microsoft.com>
Microsoft Office InfoPath
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias.  This alias is for
newsgroup purposes only.

> I have developed an Infopath with jscript code behind for data manipulation
> and validation. I'm not strong in Jscript. My questions are:
[quoted text clipped - 11 lines]
>
> Jose
 
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.