Infopath Dropdown and Jcript questions

  • Thread starter Installing W2003 on BM Infinity 4500R
  • Start date
I

Installing W2003 on BM Infinity 4500R

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
 
L

Leon O'Brien

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.
 
J

Jerry Thomas [MSFT]

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.

--
Jerry Thomas[MSFT]
<[email protected]>
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.


"Installing W2003 on BM Infinity 4500R"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top