How can I use a script in a Livecycle Designer form, to force display of text in Title Case?

Hello,
I am a 'novice' who is DIY'ing the construction of a dynamic pdf form, using Adobe Livecycle Designer 7 (I know, it's a VERY old version!)
[So, any help that comes along must be 'for Idiots'!]
I need to construct a code (Java script?) so that a few of my text-fields DISPLAY data in Title Case - IRRESPECTIVE of how the user types in the data.
So, for example, in a "Address" text-field...
If someone types in ..
"205 sherborne avenue"
- OR -
"205 Sherborne avenue"
- OR -
"205 SHERBORNE AVENUE"...
I need the data to be DISPLAYED ESSENTIALLY as...
"205 Sherborne Avenue".
I found the following code online, and tried it in the 'exit' event of the field I need to modify (with 'language' selected as JavaScript)...
<   this.rawValue = this.rawValue.replace(/\b([a-z])/g, function (_, initial) {return initial.toUpperCase();});   >
... This did convert all the 'initial' letters of the words to Upper Case - AS LONG AS they were not ALL typed in Upper Case!
So, that code worked for the first two of my samples for Sherborne Avenue above - but it did NOT work for the last one...
That is, "205 SHERBORNE AVENUE" did NOT get converted to Title Case - which is what I need help with.
Thanks in advance...

Hey TundraSteve,
Thanks a tonne!
Works perfectly!!!
In fact, your solution is so elegant and direct, that even I am beginning to get a sense of how it works... I have looked at LOTS of similar codes in the past few days, but was not at all getting a sense of how they are working! But comparing your solution with the earlier one I mentioned, I am beginning to get a sense of things!
Any suggestions for what I should read-up in order to understand this king of coding?
I have basically been using the built-in 'Help' - and, trial-and-error - and I have designed my first form - a pretty elaborate one, actually!
So, it would be great if you could guide me through the 'learning curve' a bit!
[I have figured-out the 'basics' - that is, I can lay out the form, use 'if-expressions' (FormCalc), trigger events, even build Subforms that are hidden but 'appear' when triggered by other actions, and so on. What I can't figure out are the various 'code languages' (syntax?) that are being used - like " var sometext", for eg.!]
Cheers, and thanks again!

Similar Messages

  • How can I use my Apple TV at a friends house ?? Is it not just a case of connecting to wifi then log on with my apple ID ?!

    How can I use my Apple TV at a friends house ?? Is it not just a case of connecting to wifi then log on with my apple ID ?!

    Thanks, I'll try it again. Was coming up on the screen saying something about cant work until the clock / time is configured or something ???

  • I can't use the distribute function in livecycle design?

    I can't use the distribute function in livecycle design?
    I have spent many hours designing this and the feature is not able to work it is greyed out.
    I am using adobe XI (not pro). What am I doing wrong?

    Hello,
    Do you want to make the form editable?
    If yes,
    To make this you need to Reader Extend the form by following steps.
    - Open the form in Acrobat Professional.
    - Click on Advanced option and then on Enable usage rights…here you can select the various usage rights to be enabled.
    - Save the file.
    Now you can distribute this form and users can fill in save for their records, print.
    -Vijay

  • How can I use bookmark script to deselct sidebar option by default?

    I am trying to include a User Friendly 1-Click link on my site to automatically bookmark a page.
    Using the Ultimate Bookmark script this works fine in IE, but when the bookmarking window pops up it always has the "Load this bookmark in the sidebar" option pre-checked by default.
    When testing the script I missed that point & took me quite a while to figure out what had gone wrong.
    The thing is that while I may be fairly Computer Savvy, it must be be assumed that the vast majority of the visitors to the site are not, so what I want is to be able to deselect the Sidebar option by default, allowing the user to select it, should they want it.
    Can I use a simple snippet of code in order to facilitate this?

    Those page javascripts for "Bookmark this Page" either don't work for Firefox or automatically "check" the "Load this bookmark in the Sidebar" in Firefox (and other Gecko based browsers). A Bug was filed 10 or 11 years ago to address that "Load ... bookmark ... Sidebar" issue, but it was closed with WONTFIX. The developers feel that "fixing" that feature might create a potential exploit for Firefox users.
    Best thing to do is under that "button" for other browsers, is put text along the lines of "Firefox users can Bookmark this Page using the Star or with Ctrl + D."

  • How can I use the global varialbes in the Web Form Server?

    When I migrate the Form5 to Form6i and deploy the form into WEB, I encounter a problem. In Form5, I use a form to call all the functions forms and process the login. So, the functions forms can get the login user's information by :Global variable. Now, in Web method, I use a jsp to process the login and functions hyperlinks, and the problem is how can I build a global variable in jsp and access by form in form server?
    Thank you very much!

    Nested tables are not supported in Forms 6i, only simple object tables.

  • How can I use a script to search for a list of filenames and copy them to another directory

    Hi all,
    I'm quite new to using scripts etc and wondered if anyone could help? I've only ever modified preset folder scripts so making one from scratch is a bit new to me, but it would also be great if anyone else has done this before if they could pass on there script and ill modify to suit my needs.
    I will be recieving a tab delimited file containing a list of 150 - 200 clips every day and I need to pull those files onto a hard drive.
    All of the files are housed in one folder on the internal media drive and I would like to be able to have applescript / automator / whatever  either look through the tab file and then move the files in the tab file from the internal media drive to the external transport drive or I copy and paste the filenames into the script and run it and the script moves the files from the internal media drive to the external transport drive.
    Hope someone can help,
    Many Thanks

    There are no other files in the source video root folder nor are there any folders within the subfolders.
    I have tested the script and the response I am getting is this....
    Could this be something to do with the {} on the set filestoMove command?
    In the replies box I get the following....
    tell current application
      read alias "Macintosh HD:Users:Ben:Desktop:Untitled.txt"
      --> "000004_1__4michaeljmcevoy_4iLlBuDjjG0"
    end tell
    tell application "System Events"
      count folder "Macintosh HD:Users:Ben:Desktop:source"
      --> 10
      count item 1 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> 1
      get name of item 1 of item 1 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> ".DS_Store"
      count item 2 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> 1
      get name of item 1 of item 2 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> "000004"
      count item 3 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> 1
      get name of item 1 of item 3 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> "000005"
      count item 4 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> 1
      get name of item 1 of item 4 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> "000006"
      count item 5 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> 1
      get name of item 1 of item 5 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> "000007"
      count item 6 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> 1
      get name of item 1 of item 6 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> "000008"
      count item 7 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> 1
      get name of item 1 of item 7 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> "000009"
      count item 8 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> 1
      get name of item 1 of item 8 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> "000010"
      count item 9 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> 1
      get name of item 1 of item 9 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> "000011"
      count item 10 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> 1
      get name of item 1 of item 10 of folder "Macintosh HD:Users:Ben:Desktop:source"
      --> "000012"
    end tell
    tell application "Finder"
      -- 'core'\'clon'{ 'insh':'alis'($000000000152000200010C4D6163696E746F7368204844000000000000000000 000000000000CA40F7FC482B00000006AB3D06736F75726365000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000 00000007FD33CAFABF2E0000000000000000FFFFFFFF000009200000000000000000000000000000 00074465736B746F7000001000080000CA40E9EC0000001100080000CAFABF2E00000001000C0006 AB3D0006AA9B0000BEEC000200284D6163696E746F73682048443A55736572733A0042656E3A0044 657…
      --> {}
    end tell
    Result:

  • How can I use iScroll script on iPad ?

    Hi,
    I'm trying to use this iScroll script to a simple horizontal scroll to the Stage, to be used on iPad, and I cant manage to make it scroll smoothly like it should here.
    Am I having something wrong ?
    I've added this script to CompositionReady :
    $.getScript("scripts/iscroll.js", function () {
              var myScroll;
              myScroll = new iScroll('Stage', { scrollX: true, scrollY: false, mouseWheel: true });
    thanks
    matt

    Upping this ...

  • How can i use apple script to check every couples of seconds that the requested source in iTunes DJ setting is the one i did choose before please use the if statement without the need to open the window iTunes DJ setting

    ell application "iTunes"
      activate
              reveal playlist "iTunes DJ"
    end tell
    tell application "System Events" to tell front window of application process "iTunes"
              if value of pop up button 1 is not "1 Morning List" then
                        set focused of pop up button 1 to true
                        set value of pop up button 1 to "1 Morning list"
                        delay 0.3
                        keystroke " " & return
                        delay 0.5
              end if
              click button "Settings…"
              tell pop up button 3 to if value is not "1 Morning List" then
      click
                        delay 0.1
                        click menu item "1 Morning list" of menu 1
                        delay 0.1
              end if
      click button "OK"
    end tell

  • How can I use "cin" to output a sting to my vi for display?

    I use vc++6.0 to debug my cin program,and my LABVIEW version is 7.0.
    what i need is a example code to output a string just like "hello world!" from cin to vi.
    who can help me?
    Thanks a lot!

    felixander wrote:
    I use vc++6.0 to debug my cin program,and my LABVIEW version is 7.0. what i need is a example code to output a string just like "hello world!" from cin to vi. who can help me? Thanks a lot!
    There
    are examples shipping with LabVIEW Full and better that show this and
    similar things. But.... why bother with CINs? Everything you want to do
    is much easier done in LabVIEW directly and if that fails using shared
    libraries (DLLs) is the future of interfacing LabVIEW to external code.
    CINs is an anachronisme from old days when LabVIEW had to run on a
    disguised command shell called Windows 3, that was trying to be a graphical user interface.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How can i use azure cmdlets in scom management pack scripts

    i want to show some of azure web site metrics in the scom console so i have script which gets the data from azure portal 
    how can i use that script in the scom management pack 
    [void][system.reflection.Assembly]::LoadFrom(“C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\Azure\Automation\Microsoft.WindowsAzure.Common.dll”)
    $value=Get-AzureWebsiteMetric -Name "openemrmysql" -MetricNames "Http2xx" -TimeGrain "PT1M"
    $API = New-Object -ComObject "MOM.ScriptAPI"
    $PropertyBag = $API.CreatePropertyBag()
    $result=$value.Data.Values
    foreach($result in $value)
    $global:totalvalue=$result.value.Total -as [int]
    $PropertyBag.AddValue("AzureActive","AzureActive")
    $PropertyBag.AddValue("Active", $global:value)
    $PropertyBag
    i have included this script in the management pack and it is not creating any counter in the scom console.
    Can any one help me,
    thanks & Regards,
    Suresh Gaddam

    Hi,
    I would like to suggest you check articles below to get more information about PowerShell Scripts in a Management Pack:
    http://blogs.technet.com/b/brianwren/archive/2008/02/20/running-powershell-scripts-from-a-management-pack.aspx
    http://blogs.technet.com/b/brianwren/archive/2009/06/04/powershell-scripts-in-a-management-pack-part-2.aspx
    Regards,
    Yan Li
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • How can we use SX_OBJECT_CONVERT_OTF_INTO_PDF function module IN SCRIPT

    Hi Gurus,
    can any one inform me,how to use  SX_OBJECT_CONVERT_OTF_INTO_PDF  function module in script..
    how can we convert  the script output into pdf file format....
    i need your help......plz
    my mail id : [email protected] 
    Thanks,
    Rajkumar.A
    Edited by: rajkumar annadurai on Feb 19, 2008 10:25 AM

    Hi, Dear
    In XI 3.0 we are tyring to setup SAPconnect;
    1 Step; Create RFC connection for Mlunxsnd file, anyway!!! we download thease file and create RFC connection; fine working no error
    2 Step: Create Nodes T-code SCOT => connection INT => and support address type like Internet its just show only "PDF, HTM, TXT" thats it its not show some others format
    3. Step; When check email T-code SOST Getting an error messages: "Connot process message in node, parameters cannot be converted"
    4. In R3 RPD and Others system when I check format its ok its show some others format which is support to be such as "ALI, OBJ, OTF, SCR, URL" ...
    How may install these format in XI 3.0
    Please Advice I will be really appriciated
    Thanks a lot
    Travis

  • Can we use Java Script in SAP BusinessObjects Web Intelligence 4.1?

    Can we use Java Script or any other Script in BI 4.1 Web Intelligence? If possible please do let me know the method/process

    Hi Kranthi,
    You have option to read a cell content as html. else you will have to go for SDK. I think you will get better suggestions, if you can explain your requirement in a little detailed manner.
    refer below links for more details about SDK.
    http://bukhantsov.org/2013/04/how-to-create-a-webi-document-using-java-report-engine-sdk/
    Regards,
    Nikhil Joy

  • How can I use XMLBeans in a Web Services client?

    How can I use XMLBeans in a standalone Java client with a Web Service?
    I posted the message below earlier in the year, but have not yet been successful
    in my
    attempts.
    regards
    Eddie
    Hi,
    I'm trying to using XMLBeans to send a document to a web service from a standalone
    Java client. I'm using the PurchaseOrder (easypo) example document, and the service
    expects a parameter of type PurchaseOrderDocument. The client proxy class generated
    by WebLogic Workshop, however, expects to send a parameter of type PurchaseOrder.
    In the client, I can instantiate a PurchaseOrderDocument, and then obtain a PurchaseOrder
    (e.g. pod.getPurchaseOrder() ), but the returned class is not compatible with
    the PurchaseOrder type that the client proxy expects.
    In a previous attempt (not using Workshop), the client would not compile because
    it expected to send a non-abstract class with a public default constructor (presumably
    a JAX-RPC requirement), and XMLBeans had generated an interface.
    Any help would be greatly appreciated!
    thanks & regards
    Eddie

    I have been experiencing similar problems with the HTML Editor and have managed to find an answer that should start to answer some of my questions. The Apex HTML Editor Standard is actually an HTML editor called FCKeditor. The FCKeditor has a Javascript API that can be found at http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/JavaScript_API. Unfortuately this doesn't seem to give the whole answer and I found more at http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:49607.
    I needed to get the text entered within my html editor standard (e.g. P1_MYTEXT) and use it within my javascript function. I did this by using the following script
    <script language="JavaScript" type="text/javascript">
    function showtext(){
    var oEditor = FCKeditorAPI.GetInstance('P1_MYTEXT');
    var editortext = escape(oEditor.GetXHTML(oEditor.FormatOutput));
    alert(editortext);
    </script>
    Hope this helps.
    Matthew

  • How can I use LCCS with ActionScript 3 and Flash CS4?

    Hi,
    Using Stratus I was able to create an an application using Action Script 3 and Flash CS4.  The sample code on the Adobe site was quite straight forward and easy to understand.  I now want to switch over to  LCCS but can't find anything any where on how to use Action Script 3 and Flash CS4 with LCCS.  Do I need to know Flex to be able to use LCCS?  Everything was quite simple and easy to understand with Stratus and makes complete sense.  But LCCS is really confusing.  Is there any sample code on how to establish a connection in Action Script 3 and then stream from a webcam to a client.  There is nothing in the  LCCS SDK that covers Flash and Action Script 3.  Please help!  I found the link below on some forum but it takes me nowhere.
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=72&catid=75 9&threadid=1407833&enterthread=y

    Thanks Arun!
    Date: Thu, 29 Apr 2010 11:44:10 -0600
    From: [email protected]
    To: [email protected]
    Subject: How can I use LCCS with ActionScript 3 and Flash CS4?
    Hi,
    Welcome to the LCCS world.
    Please refer to the SDK's sampleApps folder. There would be an app called FlashUserList. The app demonstrates how LCCS can be used with Flash CS4. Its a  pretty basic app, but should help you moving.
    We are trying to improve our efforts to help developers in understanding our samples. Please do let us know if we can add something that would help others.
    Thanks
    Arun
    >

  • How Can I run a script to all servers in my servers list

    Hi Guys
    I have a Servers list:servers.txt , it's including all servers i need to run a powershell script,how can I use the powershell to run a script on those servers? thank you.I just start to learn about powershell.

    You can pipe the results of Out-Command to Out-File (or Export-Csv, etc.)  I'm not sure what kind of objects you're expecting from this script, so I'll err on the side of caution and use Format-List * in the example:
    Invoke-Command -ComputerName $servers -FilePath c:\copy.ps1 |
    Format-List -Property * |
    Out-File -FilePath $home\Desktop\copy.log

Maybe you are looking for