Help with the script for fullname

Hello
I am trying to write a script on my form for a fullname field. For eg:" someone enters fullname as abc l xyz then i want it to be like Abc L Xyz
i tried writing a script but i am messing up somewhere. Can anyone help me please, its urgent
Thanks

Hi Jasmin
I am trying to put a jAVAScript into the script window and got the following script it works otherwise but when inserted into form it doesn't work
I am doing it on exit event
var FormName = "7158.pdf";
var FieldName = "FullName2";
function CapitalizeNames() {
var ValueString = new String();
eval('ValueString=document.'+FormName+'.'+FieldName+'.value');
ValueString = ValueString.replace(/ +/g,' ');
var names = ValueString.split(' ');
for(var i = 0; i < names.length; i++) {
if(names[i].length > 1) {
names[i] = names[i].toLowerCase();
letters = names[i].split('');
letters[0] = letters[0].toUpperCase();
names[i] = letters.join('');
} else { names[i] = names[i].toUpperCase(); }
ValueString = names.join(' ');
eval('document.'+FormName+'.'+FieldName+'.value=ValueString');
return true;

Similar Messages

  • [svn:fx-trunk] 5579: Be consistent with the scripts for Button sample

    Revision: 5579
    Author: [email protected]
    Date: 2009-03-26 11:06:44 -0700 (Thu, 26 Mar 2009)
    Log Message:
    Be consistent with the scripts for Button sample
    Modified Paths:
    flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxButtonExamp le.mxml

  • I still need help with the Dictionary for my Nokia...

    I still need help with the Dictionary for my Nokia 6680...
    Here's the error message I get when trying to open dictionary...
    "Dictionary word information missing. Install word database."
    Can someone please provide me a link the where I could download this dictionary for free?
    Thanks!
    DON'T HIT KIDS... THEY HAVE GUNS NOW.

    oops, im sorry, i didnt realised i've already submitted it
    DON'T HIT KIDS... THEY HAVE GUNS NOW.

  • Can anyone help with the scripting on this file?

    Hi, I hope someone with a bigger brain can help me out here.
    I've got an existing Flash CS3 file that makes up the result at http://www.infusion-set.com/flash/Elearning/Inset30/inset30_eguide.html.
    The client has asked if I could add an extra tab at the top after 'Reconnecting' called 'Contact Us' with link to an extra page. All the design has been done in ActionScript 2 with references to XML files for the dynamic content because it's been done in other languages as well.
    I've amended the existing XML file with the correct references for a new page and an accompanying .swf file to play in the animation area.
    I've attempted a .fla version where I duplicated one of the existing tabs script, changed the XML references and changed the variables where necessary to 'con or 'Con' (representing Contact Us). Unfortunately it made the tab menu go completely off the page and was obviously wrong in some way.
    Can anyone give me a clue as to what to change here on the original file as I'm a bit of a novice with ActionScripts, hence me asking.
    For reference I've attached HTML files with the original file scripts and my incorrect version. The  timeline is 103 frames with the scripts placed at frame 1 and 102
    Thanks.
    Garry

    The buttons are all created using the same library object (but MC), except for the code you have in the revised file does not call on that for the con button.
    You have it calling on something with a linkage name of "con", which a quick check tells me doesn't exist--so it is undefined in the code when you try to use it.  I found this by using trace(newConBut._x); after its _x value was assigned, as I mentioned you should try.   So the first thing you want to do is change the following line from...
    var newConBut = _root.attachMovie("con", "conbut", _root.getNextHighestDepth());
    To
    var newConBut = _root.attachMovie("but", "conbut", _root.getNextHighestDepth());
    so that it uses the but MC that serves that purpose in the library.  Then you want to correct the _x assignment of the buttons to what I think you had earlier...
    newConBut._x = 650-newConBut._width;
    newRecBut._x = newConBut._x-newRecBut._width;
    Here is a picture of what those changes do (note, without the XML file I had to finagle things just to work, so the biutton labels aren't what they will be)...

  • Help With dynamic scripting for Dervied Property

    Hi,
    I am trying to get the the list of child nodes and then loopthorugh those nodes to do some calculation in a derived propety using dynamic scripting. I tried with below script.
    var childEnumerator = node.GetChildEnumerator();
    while(childEnumerator.MoveNext())
        var propValue = childEnumerator.GetCurrent().PropValue("Custom.Salary");
        print(propValue);
    While Evaluating this script I am getting below mentioned error. Any idea what i am missing here?
    DRM-16008: There was an error calculating Script property Custom.TotalSalaryExp for EMP_Zone/Emp/PPD1: TypeError: 'GetChildEnumerator' is not a function
    Please help me out. thanks fr your co-operation
    Regards,
    Sudipta

    Try this instead...
    var childEnumerator = node.GetChildEnumerator();
    childEnumerator.MoveNext();
    while(childEnumerator.GetCurrent() != null)
        var propValue = childEnumerator.GetCurrent().PropValue("Custom.Salary");
        print(propValue);
    childEnumerator.MoveNext();

  • Help with understanding script for rotating objects

    Hi all
    would some help me with this, I am trying to understand what part of AS3 script says loop through(create a continues 360 loop of objects) the images from an XML file, does this make any sense.
    in my script I have this
    for(var i:int = 0; i < images.length(); i++)
    is this the part that says loop the images/objects
    this is a little more to the script including the above to maybe understand better?
    private function onXMLComplete(event:Event):void
    // Create an XML Object from loaded data
    var data:XML = new XML(xmlLoader.data);
    // Now we can parse it
    var images:XMLList = data.image;
    for(var i:int = 0; i < images.length(); i++)  <<<<<<<<FROM ABOVE ///        {
    // Get info from XML node
    var imageName:String = images[i].@name;
    var imagePath:String = images[i].@path;
    var titles:String = images[i].@title;
    var texts:String = images[i].@text;
    any help would be great

    hi rob
    ok I found this menu which rotates item around on a 360 wheel trying to see if I can use the same script on my menu,
    link to example: http://art.clubworldgroup.com/menu/R...g_menu_AS3.zip
    I have highlighted in blue what creates the loop of items
    in my menu I do  ot have anything like
    var angleDifference:Number = Math.PI * (360 / NUMBER_OF_ITEMS) / 180;
    which sest up the 360 circle of the item
    //Save the center coordinates of the stage
    var centerX:Number=stage.stageWidth/2;
    var centerY:Number=stage.stageHeight/2;
    //The number of items we will have (feel free to change!)
    var NUMBER_OF_ITEMS:uint=15;
    //Radius of the menu circle (horizontal and vertical)
    var radiusX:Number=200;
    var radiusY:Number=200;
    //Angle difference between the items (in radians)
    var angleDifference:Number = Math.PI * (360 / NUMBER_OF_ITEMS) / 180;
    //How fast a single circle moves (we calculate the speed
    //according to the mouse position later on...)
    var angleSpeed:Number=0;
    //Scaling speed of a single circle
    var scaleSpeed:Number=0.0002;
    //This vector holds all the items
    //(this could also be an array...)
    var itemVector:Vector.<Item>=new Vector.<Item>;
    //This loop creates the items and positions them
    //on the stage
    for (var i:uint = 0; i < NUMBER_OF_ITEMS; i++) {
        //Create a new menu item
        var item:Item = new Item();
        //Get the angle for the item (we space the items evenly)
       var startingAngle:Number=angleDifference*i;
        //Set the x and y coordinates
        item.x=centerX+radiusX*Math.cos(startingAngle);
        item.y=centerY+radiusY*Math.sin(startingAngle);
        //Save the starting angle of the item.
        //(We have declared the Item class to be dymamic. Therefore,
        //we can create new properties dynamically.)
        item.angle=startingAngle;
        //Add an item number to the item's text field
        item.itemText.text=i.toString();
        //Allow no mouse children
        item.mouseChildren=false;
        //Add the item to the vector
        itemVector.push(item);
        //Add the item to the stage
        addChild(item);
    //We use ENTER_FRAME to animate the items
    addEventListener(Event.ENTER_FRAME, enterFrameHandler);
    //This function is called in each frame
    function enterFrameHandler(e:Event):void {
        //Calculate the angle speed according to mouse position
        angleSpeed = (mouseY - centerY) / 5000;
        //Loop through the vector
        for (var i:uint = 0; i < NUMBER_OF_ITEMS; i++) {
            //Save the item to a local variable
            var item:Item=itemVector[i];
            //Update the angle
            item.angle+=angleSpeed;
            //Set the new coordinates
            item.x=centerX+radiusX*Math.sin(item.angle);
            item.y=centerY+radiusY*Math.cos(item.angle);
            //Calculate the vertical distance from centerY to the item
            var dx:Number=centerX-item.x;
            //Scale the item according to vertical distance
            //item.scaleX = (dx / radiusX);
            //If we are above centerY, double the y scale
            if (item.x<centerX) {
                item.scaleX*=1;
            //Set the x scale to be the same as y scale
            item.scaleY=item.scaleX;
            //Adjust the alpha according to y scale
            item.alpha=item.scaleX+1.9;

  • Need help with python script for Deluge

    I am using Deluge 1.3.2 with web server, and all works fine, I use this script in the Deluge settings to execute upon torrent completion:
    #!/bin/bash
    torrentid=$1
    torrentname=$2
    torrentpath=$3
    torrenttimedelta=`/usr/bin/python2 /home/bobby/scripts/deluge/torrentTimeDelta.py $1`
    subject="Started download new torrent!"
    message="$torrentname to $torrentpath"
    echo -e `date`"::Finished downloading torrent:$2 in: $3" with id:$torrentid >> ~/logs/scripts.log
    echo -e `sendEmail -t [email protected] -f [email protected] -u "deluge server notification: torrent $torrentname is complete!" -m "$torrentname has completed downloading at: $torrentpath and took $torrenttimedelta to complete :)" -xu [email protected] -xp password -v -o tls=yes -s email.com` >> ~/logs/scripts.log
    echo ---------------------------------------- >> ~/logs/scripts.log
    This is to email me when a torrent is done and works. What I wanted to add to this email was the time taken to complete the torrent. I have gotten help from Deluge forum in this thread: http://forum.deluge-torrent.org/viewtop … =9&t=36989  However I think it's something with Python within Arch that is the obstacle, and so that helpful person can't do much more IMO. The python script I'm using is:
    #!/usr/bin/python2
    from deluge.ui.client import client
    from twisted.internet import reactor
    d = client.connect()
    def on_connect_success(result):
    print "Connection was successful!"
    def on_get_torrent_value(value):
    for torrent in value:
    print "%s: %s" % (torrent, value[torrent]["name"])
    client.disconnect()
    reactor.stop()
    client.core.get_torrents_status({}, ["name"]).addCallback(on_get_torrent_value)
    d.addCallback(on_connect_success)
    def on_connect_fail(result):
    print "Connection failed!"
    print "result:", result
    d.addErrback(on_connect_fail)
    reactor.run()
    Now if I call this from shell directly, it works. However, including it with my email script at the top, Deluge itself freezes and no email is sent. I run ps aux | grep deluge and I can see that the script has run, but apparently died and all is just hanging. I kill the script process and Deluge resumes just fine, the email is sent. Kinda confused how to remedy this, appreciate any help Thanks
    P.S. When I get the email, the part that says ""$torrentname has completed downloading at: $torrentpath and took $torrenttimedelta to complete "" shows nothing where $torrenttimedelta should be, it just says "and took to complete"

    [edit]  Sorry, I don't use deluge and I messed up my test script. If the script is executable try `/home/bobby/scripts/deluge/torrentTimeDelta.py $1`
    Are there any other errors? or try running bash with debug output to see if it will tell you something else
    The problem you are having is bash doesn't recognize variables inside the tick marks.
    Hope that helps
    Last edited by rickeyski (2011-07-05 19:27:36)

  • NEED a java coder to help with a script for a programs of mine.

    I play a game, very competitively, and need someone to make and compile a script for me. I am willing to pay upwards of 100 USD for this script made to MY standards. There will be a lot of work involved...Probably 12 hours studying my game and the purpose of the script(s). I will be buying 2-3 scripts, at roughly 50-100 USD each, depending on the quality. I will transfer the money via paypal, or other means if we can reach an agreement.
    Please IM me at Chadtrapier on AIM or send an email to [email protected]
    Or...Add me on MSN - [email protected]
    We can reach an agreement with these scripts...
    Thank you, I will also check this thread, so reply if you would like.
    ~Chad

    Ummm. Do you think that's a lot of money or something? Think in the range of 40-60 per hour. And if you're talking about warcraft I don't think they java hooks to make bots. I think you need to figure out what your problem is first and maybe learn to code them yourself.

  • IDXML - Help with the rights for the "useerGroupsProfile" command

    On page 121-122 of the developer guide for CoreID - It mentions that in order to use the IDXML command for "userGroupsProfile" that the "The logged-in user must be able to grant read capability on the proxysourceuid classname attribute"
    I am pretty sure this is the issue I am having using this command. I am passing valid DN's to it, but it keeps telling me it cannot find the user. My guess is that my service account making the request does not have the right to "grant read capability on the proxysourceuid classname attribute".
    The other issue is that I have is I have no access to the CoreID admin to make this change / search the screens to find out exactly where to grant this right. I have to pass all requests for these kind of changes on to our CoreID admin (Who is also just learning to work with the system in this capacity.)
    Any specific instructions on where we can change this "right" would be greatly appreciated. (Such as which admin screen / attributes need to be set and where).
    Thanks again - -

    From the CoreID screens, I can access both the user manager and group manager screens.
    When I access the user manager, I can see all users... but cannot see what groups they are in.
    When I access the group manager, I can see all groups. I can also see who is in each of the groups.
    So it seems like I am missing the rights to jump from a user to the users memberships. When the absolute admin logs into those screens... they are able to do that.
    IDXML Below:
    <?xml version="1.0" ?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas-xmlsoap.org/soap/envelope/" xmlns:oblix="http://www.oblix.com">
         <SOAP-ENV:Body>
              <oblix:request application="groupservcenter" function="userGroupsProfile" mode="dataonly" version="NPWSDL1.0">
                   <oblix:params>
                        <oblix:proxysourceuid>CN=Smith\, John,OU=Users,OU=ASDF,ou=oblixjoin,ou=vde,dc=vde,dc=mycompany,dc=com</oblix:proxysourceuid>
                        <oblix:showMemberOfGroups>true</oblix:showMemberOfGroups>
                        <oblix:showOwnerOfGroups>true</oblix:showOwnerOfGroups>
                        <oblix:showStaticGroups>true</oblix:showStaticGroups>
                        <oblix:showDynamicGroups>true</oblix:showDynamicGroups>
                        <oblix:showNestedGroups>true</oblix:showNestedGroups>
                        <oblix:showAdministratorOfGroups>true</oblix:showAdministratorOfGroups>
                   </oblix:params>
              </oblix:request>
         </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>

  • Help with the commapi for parallelport!!!!

    If anyone could help me with this i will really appreciate it. I am trying to read and write from the parallel port (LPT1) but have been unable to do so. If anyone could post a code where the parallel port reads and writes to the port i would really greatful.
    If there are any good links to places who show anything about commapi intefacing with the parallel port i would also appreciate it as all i find are serial port ones everywhere. (I want to use the parallel port in a applet as my laptop only has a parallle port and not a serial).
    Thx to everyone who tries to help me

    http://java.sun.com/products/javacomm/javadocs/API_use
    rs_guide.htmlI have reached a similar stage where I can detect the ports but cant read any signals from them. I have also read the above documentation and since this is the first time I have been attempting commapi programing, any further insight would be very helpful.
    I am trying to read signals that are coming to a parallel port

  • Help with a script for checking processes

    hello,
    I have the following script
    while :
    do
    date
    ps -ef |grep f60runm | wc -l
    sleep 60
    done
    I would like this script to also add to a txt file so that I can see the activity overnight.
    rgds
    Alan

    Well, if the commands are in a script:
    script.sh >> /path/to/logfile.log
    or you could do this inside the script:
    LOGFILE="/path/to/logfile.log"
    while :
    do
    date >> $LOGFILE
    ps -ef |grep f60runm | wc -l >> $LOGFILE
    sleep 60
    done

  • Need help with easy script for open / close app and move files

    Hi,
    I'm not a scripter.. never done anything special perhaps more complicated than /shutdown -s on cmd..
    I actually learned ASCII C language on university but never used it in real.
    I'm trying to create a basic script that perhaps you could help me or guide me how to do it..
    The commands are
    1) Close a running app (end task it or force kill it, I prefer end task it)
    2) delete files from x location
    3) run .exe app from y location
    4) close that running app 
    5) move files from z to y
    Perhaps adding few "wait few seconds" commands in between each, so the apps will launch successfully..
    My first question will be whats the easiest script language to do that?
    I tried VBScript but couldn't find commands for open or close apps.. also for controlling files..
    And what commands can do that? I could google them up for better understanding no need for rough guide
    And lastly, does it too hard? If it takes more than hour to make it (learn and process) than it ain't worth it..
    Thanks alot ahead!
    Jordan.

    hmm 2 questions:
    1) taskkill.exe causing me access deny error.. I used "taskkill.exe /IM softwarename.exe"
    how do I get permission or something to fix that?
    2) on the "move" command..
    First, its a "copy" instead.. but I easily figured that out.. 
    but more important is that I want to copy a folder.. with unknown list of way too long files and sub folders..
    and all I see is ability to move a file..
    Is this possible?
    Thanks

  • Help with a script for elder friend

    First off, with apologies, I am not a script familar person at all.  I have an elderly friend who is switching to Mac for the first time.  I wanted a way to close all open programs, with a prompt to save any open files and then run a Time Machine backup and shut down - preferably without restarting next day with any windows opening automatically.  Time Machine is set to run every hour but she's a writer and could lose work if Time Machine doesn't run before shutting down for the night.  So I searched and found some small scripts that I tried to put together.  I think it works but after Time Machine runs it waits a very long time before shutting down.  I'm wondering if some of you kind folks could refine this for me.  (I do realize that automator has a quit all programs that I can save as an app but I'm trying to make this a one step 'app' process.)
    So what I have is this:
    tell application "System Events" to set the visible of every process to true
    set white_list to {"Finder"}
    try
              tell application "Finder"
                        set process_list to the name of every process whose visible is true
              end tell
              repeat with i from 1 to (number of items in process_list)
                        set this_process to item i of the process_list
                        if this_process is not in white_list then
                                  tell application this_process
                                            quit
                                  end tell
                        end if
              end repeat
    on error
              tell the current application to display dialog "An error has occurred!" & return & "This script will now quit" buttons {"Quit"} default button 1 with icon 0
    end try
    do shell script "/bin/bash -c '/System/Library/CoreServices/backupd.bundle/Contents/Resources/backupd-helper > /dev/null 2>&1  &'"
    repeat
      delay 5
              if not IsProcRunning("backupd") then
                        ignoring application responses
                                  tell application "Finder" to shut down
                        end ignoring
                        exit repeat
              end if
    end repeat
    on IsProcRunning(theProc)
              try
                        do shell script "ps auxc | grep \"" & theProc & "\""
                        return true
              on error
                        return false
              end try
    end IsProcRunning
    .... frankly I don't understand most of this in reality but it's a need I'd like to help her with on her Mac Mini. 
    Many Thanks,
    Brenda

    First off, you're overthinking this.  There's no reason why your friend would lose any data by not backing up prior to shutdown (unless she has a flaky hard drive that needs to be replaced).  Assuming she's saving her work when she quits her apps, she should be fine.
    Second, trying to auto-quit applications is dangerous.  You don't check to see if any files need to be saved (there's no easy way to make that check anyway), and that in itself could cause data loss.
    Third, time machine has its own command line utility: tmutil.  There's no reason to script backupd.
    Last, if I remember correctly, whether or not apps and windows reopen at startup can be set on a system-wide or per-application basis.
    Give a clearer and more specific description of the goals you're trying to accomplish: what kind of apps are likely to be open, which of them will/might need to save data, what you want the machine to look like on restart, all with details.  That would help a lot.

  • Need help with configure script for audacious plugin

    Hello. I have written a small plugin for audacious, that uses an Amarok script to retrieve song lyrics and displays them in a window. I'd like to make an AUR package of it, but I don't even know how to write a configure script. I used to compile it with audacious-plugins, but I suppose a package with all audacious plugins plus my own would be sort of a duplicate of the vanilla audacious-plugins.
    Can anyone help me?

    btn1.addEventListener(MouseEvent.CLICK,f1):
    function f1(e:MouseEvent){
    nextFrame();
    btn2.addEventListener(MouseEvent.CLICK,f2):
    function f2(e:MouseEvent){
    prevFrame();

  • Help with apple script for Chapter Markers (on each edit)

    Hi,
    My goal:
    Add for each edit in the sequence a chapter marker til the end of the sequence.
    (Bonus track would be: Name the marker like the current clipname )
    so far I could work it out, with a lot of googling.... but:
    Not working: character "a" is not typed, no idea why ?
    Not working: goto begin of sequnce at the beginning
    And: I need something like a loop til the end of the sequence
    help very appreciated !
    thanks
    P.S.: I work tith FCP 7
    Here's my code so far:
    tell application "Final Cut Pro"
      activate
              tell application "System Events"
                        delay 0.5
      key code 34 using {shift down} #Go to Begin
                        delay 0.5
      key code 125 # Arrow Down, next edit
                        delay 0.2
      key code 46 #Create a marker
                        delay 0.2
      key code 46 #Edit the marker title
                        delay 0.2
      key code 48 # TAB
                        delay 0.2
      key code 50 # <
                        delay 0.2
      key code 8 using {shift down} # C
                        delay 0.2
      key code 4 # h
                        delay 0.5
      key code 128 # a
                        delay 0.2
      key code 35 # p
                        delay 0.2
      key code 17 # t
                        delay 0.2
      key code 14 # e
                        delay 0.2
      key code 15 # r
                        delay 0.2
      key code 50 using {shift down} # >
                        delay 0.5
      key code 76 #Enter, Get out of marker window
                        delay 0.5
      key code 125 # Arrow Down
              end tell
    end tell

    Use Automator. It's great for repetitious tasks (like the one you've described), and it's very user-friendly. Open Automator, create a new workflow that executes the action you want, and you can apply that action to the resources you wish to edit.
    Good resource here:
    http://bit.ly/

Maybe you are looking for