Convert Feet and Inch to cm (and vice versa)

I need some help with conversion of height. The form was designed by the department and there is a field where one need to enter the height of the participant.
The height can either be in cm or in Feet + Inches (not just inches). Once a value has been entered in cm, it converts it automatically to feet and inches. If the user enter the height in feet and inches, it converts it immediately into cm. Much like the kg to lbs conversion fields in the attached document. I have been able to convert the height in cm into Feet and inches e.g. 165 cm = 5'5". However I am not sure how to do the opposite.
The problem is the way it has been designed as there is a box for Feet and another box for Inches. If the other measure was in Inches only, it would have been easier and that would be like the kg to lbs conversion.
I have tried multiple way to try to the conversion, but none would do it exactely like the kg to lbs conversion.
Here is the form:
https://workspaces.acrobat.com/?d=j8kksFor3eVIg6M07CdkmA

I tried the following code, but obviously does not work. The problem reside in the fact that I have to reunite 2 fields to get the height in cm and am not sure how to handle that.
var v1 = (function () {
    var f_source = getField("Feet");
    var result;
    if (event.source && event.source === f_source) {
        result = f_source * 30.48  ;
        event.value = result == 0 ? "" : util.printf("%.0f", result);
var v2 = (function () {
    var f_source = getField("Inches");
    var result;
    if (event.source && event.source === f_source) {
        result = +f_source  * 2.54 ;
        event.value = result == 0 ? "" : util.printf("%.0f", result);
event.value = v1 + v2;

Similar Messages

  • How you can solve a problem or find out on a dead pc if the problem relies on motherboard and not on processor or vice versa

    hi.
    I am working myself with computers ,  so there is one thing in my mind I wanted to be sure,which I couldn't find an answer for it!
    because I had before totally black screen and the problem was damaged processor.
    I am wondering how I can be sure as the last option when I get a black screen and there is no lihgts at all no any LED is lighting.totally dead pc.
    how  you can be sure then that the problem relies on processor and not on motherboard or vice versa the problem relies on motherboard and not on processor
      because I can't say to the customer lets buy first a processor if it is the cause of dead PC and if not then we buy motherboard. this sounds not wise.
    so I experimented first with my latop ,I pulled out the processor to see if I can see any LED light or any movement on the motherboard to be sure that motherboard giving me some clue that it is healty. I gave some light heat to de fan to let it turn ,because 
    it is working with heat sensors then I know that the motherboard is healty. but it didn't work. 
    I did the same with my desktop computer and the result is the same no any lights and no any movement on the motherboard . so now can some one tell me how you can distuingish as a last result which of this 2 components is causing dead PC. is there any
    tool to test the motherboard or how asus,dell ect. they solve such a problem if the customer send to them a dead pc.
    I know that the power supply also can cause dead pc but I know how to solve a problem  with dead power supply. and I want to keep away power supply from this question. please do not tell me that  Idon't have to pull out processor
    because I am a technician and both of my computers are doing very good after this experiment.
    thanks
    johan
    h.david

    Usually if you have some kind of hardware failure there is some beeping during POST or most motherboards now have LED indicators to produce and error message based on the type of failure
    So if its bad memory, not place properly, mismatched, processor not inserted properly, mismatched voltage or voltage connector not present etc it beeps or generates the error id.
    Power supplies can be tested for failure. There are some walk throughs for testing just them with a switch, paperclip or a jumper (I'd suggest not doing this if you are not familiar with the dangers of electricity).
    Memory can be tested with memory diagnostics programs like Memtest+
    Processors can overheat if the proper precautions have not been taken usually you will get a POST beep or error code for that.
    If the motherboard has no response then do the basics first:
    Check power connectors and power supply. Once you determine that is not the case move on to other items like graphics cards in all the way or memory.

  • HT204411 Why are some films available for download in the USA and not the UK or vice versa?

    Why are some films available for download in the USA and not the UK or vice versa? For example the film 'Back to the Secret Garden' is available for download in the US and not the UK.

    MikeAlan192 wrote:
    Why are some films available for download in the USA and not the UK or vice versa? ...
    Availability is determined/controlled by the Copyright owner... not Apple.

  • Since 4.3 software update, then a sync to get my music back, my apps won't work...either I have no music and apps that work or vice versa

    Since 4.3 software update, then a sync to get my music back, my apps on ipod touch won't work

    Did you purchase the music through the iTunes Store?
    The apps you have purchased can be downloaded for free from the App Store.
    http://support.apple.com/kb/HT2519

  • Convert char to ascii code and vice versa

    HI
    Is there any function module to convert char to ascii code and vice versa.
    Thanks in advance

    Hi,
    be careful if you have unicode running in your system. URL_ASCII_CODE_GET is platform-dependent so it will return the internal HERX representation of the character in your system - which is hopefully and in most cases ASCII.
    Under unicode, we use double-byte characters here. I tried this function and the result CHAR_CODE is '00' regardless what character I specify for TRANS_CHAR. But the coding is so simple I corrected resultig in this sample code:
    [P]
    convert p_form to ASCII (internal) representation
      DATA:
        l_ofs TYPE syfdpos,
        l_len TYPE sy-linsz,
        l_ascii TYPE i.
      FIELD-SYMBOLS:
        <x> TYPE x.
      l_len = STRLEN( p_ascii ).
      DO l_len TIMES.
        l_ofs = sy-index - 1.
        ASSIGN p_ascii+l_ofs(1) TO <x> CASTING.
        l_ascii = <x>.
        WRITE: l_ascii.
      ENDDO.
    [/P]
    Here, for each character of string p_ascii, the internal (ASCII) representation is determined and written to the output list.
    Regards,
    Clemens

  • PDF to Word.doc Converter and vice versa

    Hello!
    I am in need of a program capable to convert PDF files to Word documents and vice versa (eventually, a program for each way). The converter needs GUI and must handle images, tables etc. (not just plain text). Does anyone have any tip concering which
    program I should use? It has to be free as my working place has not budgeted with buying 100 licenses. :-)
    Thanks in advance!

    Free? You'll be lucky. Your best bet to achieve your requirements is a PDF compatible OCR application such as Finereader. Free it ain't!
    <IKT-kr> wrote in message news:[email protected]...
    Hello!
    I am in need of a program capable to convert PDF files to Word documents and vice versa (eventually, a program for each way). The converter needs GUI and must handle images, tables etc. (not just plain text). Does anyone have any tip concering which program
    I should use? It has to be free as my working place has not budgeted with buying 100 licenses. :-)
    Thanks in advance!
    Graham Mayor - Word MVP
    www.gmayor.com
    Posted via the Communities Bridge
    http://communitybridge.codeplex.com/

  • Converting feet and inches to pixels

    I design Video Content for live shows. Often my set designer comes up with bizarre screen sizes. I am looking for a simple app that converts feet and inches into pixels. I want to be able to determine the pixel equivilent of his screen dimensions so that I can create a mask. I have done this using Photoshop, but it would be so much easier if I could simple input the dimensions and then get my results.
    Here's a typical size he would give me...8' by 100 yards ( I know that's insane) or 37' by 17 '
    Any help would be apprecitated

    Johnny,
    Trust me ... I'm no mathematical wizard or
    technoguru, but it seems that as long as you know the
    aspect ratio of the screen you need to fill and you
    match that, the actual pixel dimensions would be more
    of a issue of the display device (a projector, I'm
    assuming).
    For example, I output 720 x 480 (NTSC DV) to tape or
    640 x 480 (DVD-Video) all the time that is later
    projected on a variety of different sized screens.
    If the screen is a 4:3 aspect ratio, my video fills
    the screen if the projector is positioned correctly
    and the right lens is used.
    -DH
    Thanks for the replies guys.
    The problem is that he never gives me ratios, he just gives me stratight sizes.
    I build these in 720 x 480 and they are sent through some unexplicable beta/do-ray-me configuration to output on giant LED walls. The resolution doesn't matter. This strange output configuration only reads my video the same as if I was outputting straight from FCP.
    On one job he gave me the simple 16:9 ratio and I simply put a 16:9 matte on everything within a 720 x 480 using Joe's Filter Beta "Joe’s Aspect Matte RT".
    That was easy. What gets tricky is when he gives me some strange size like
    37 feet high by 6 feet wide. Is there an easy way to figure out this ratio and then build it within 720 x 480 using a matte. If I knew the pixel numbers of 37' by 6' I could just adjust my matte accordingly.

  • How to convert a data set into a xml data and vice versa

    i am new to oracle with xml..
    my aim is to convert a data set into a xml data and vice versa..
    my work is as follows...
    my query:
    select rggpk,rggcode,rggname from ms_regiongeo
    to convert a data set into a xml*
    select XMLType(trim(replace(dbms_xmlgen.getXML('select rggpk,rggcode, rggname from ms_regiongeo'),'<?xml version="1.0"?>',''))) XML_DATA from dual;
    (this works fine and output of this query is as follows..)
    <ROWSET>
    <ROW>
      <RGGPK>201</RGGPK>
      <RGGCODE>Asia</RGGCODE>
      <RGGNAME>Asia</RGGNAME>
    </ROW>
    <ROW>
      <RGGPK>1</RGGPK>
      <RGGCODE>OTH</RGGCODE>
      <RGGNAME>Others</RGGNAME>
    </ROW>
    <ROW>
      <RGGPK>21</RGGPK>
      <RGGCODE>COB</RGGCODE>
      <RGGNAME>Africa and Yemen</RGGNAME>
    </ROW>
    <ROW>
      <RGGPK>2</RGGPK>
      <RGGCODE>AUS</RGGCODE>
      <RGGNAME>Australia</RGGNAME>
    </ROW>
    <ROW>
      <RGGPK>23</RGGPK>
      <RGGCODE>IND</RGGCODE>
      <RGGNAME>Indian Sub Continent</RGGNAME>
    </ROW>
    <ROW>
      <RGGPK>24</RGGPK>
      <RGGCODE>TVM</RGGCODE>
      <RGGNAME>North America</RGGNAME>
    </ROW>
    </ROWSET>
    and to reverse this process, I tried a query like this..*
    select EXTRACTVALUE (XML_DATA,'ROWSET/ROW/RGGPK') as EMP_ID
    from(
            select XMLType(trim(replace(dbms_xmlgen.getXML('select rggpk,rggcode, rggname from ms_regiongeo'),'<?xml version="1.0"?>',''))) XML_DATA from dual
    )tab1but failed.. and raised with an eror: ORA-19025
    help me..
    regards,
    john

    Hi-
    my aim is to convert a data set into a xml data  You can refer to the below posts
    Adding namespace to XML output
    Re: how to convert table data in xml format based on the xsd.

  • How to convert SOAPEnvelope or SOAPBody to org.w3c.dom.Node and vice versa?

    How to convert javax.xml.soap.SOAPEnvelope or javax.xml.soapSOAPBody to org.w3c.dom.Node and vice versa?If this convertion is very diffcult , how to convert String to org.w3c.dom.Node?
    Thanks a lot

    vj008 wrote:
    while parsing a DOM i want to convert
    org.w3c.dom.Element to xml string and after certain processing on that xml string i want to convert back it to
    org.w3c.dom.Element.[This might help. xml transformations in java. |http://tejaspurohit.blogspot.com/2009/08/xml-transformations-in-java.html]

  • How to convert from UNICODE (UTF16) to UTF8 and vice-versa in JAVA.

    Hi
    I want to insert a string in format UTF16 to the database. How do I convert from UTF16 to UTF8 and vice- versa in JAVA?. What type must the database field be? Do I need a special set up for the database (oracle 8.i)?
    thanks
    null

    I'm not sure if this is the correct topic, but we are having problems accessing our Japanese data stored in UTF-8 in our Oracle database using the JDBC thin driver. The data is submitted and extracted correctly using ODBC drivers, but inspection of the same data retrieved from the GetString() call using the JDBC thin driver shows frequent occurrences of bytes like "FF", which are not expected in either UTF8 or UCS2. My understanding is that accessing UTF8 in Java should involve NO NLS translation, since we are simply going from one Unicode encoding to another.
    We are using Oracle version 8.0.4.
    Can you tell me what we are doing wrong?
    null

  • How to convert ascii value into character and vice versa

    Hello the java world people,
    I want to convert each characters from my array into their corespondent ascii value and vice versa, how can I do that ?

    The term "ASCII" is often used very loosely.
    Java char values are UNICODE and the ASCII codes are indentical to UNICODE characters in the range 0 .. 127. UNICODE values 128 and above don't have coresponding ASCII values, though 128-255 corespond to ISO-8859-1 which is one of the encodings often called "extended ASCII".
    As shown above you can covert between chars and coresponding int value simply with a cast, but you should be aware that the more exotic characters will not give you sensible values.

  • How can you convert a live RTMP stream to RTMFP and vice versa in flash?

    Assume three computers: A, B, and C. A is streaming live video and audio to B through RTMP. How could that stream be converted to RTMFP and sent through B to C - while at the same time, still going to B as RTMP? How could a live stream from C be similarly sent to B as RTMFP and A as RTMP?
    It doesn't matter to me whether B converts it on the client side, or whether the FMS between A and B convert it. Part of the problem is that B can get streams to and from both A and C, but A and C are effectively disconnected from each other. Another part of the problem is that A has to be able to use RTMP, not necessarily RTMFP, whereas C is guaranteed to use RTMFP. All three clients still need to be able to connect to each other in a live video chat.
    Thanks!

    you don't have to completely redo your project but you will probably need to redo large parts of it.  in addition, there's no quick way of doing what you want and ensuring everything will work well unless you dig into the details of publishing for mobiles.
    it looks like your swf's background is transparent.  you assigned the wmode attribute in your embedding code to be transparent.

  • How to Convert internal table data into xml and xml data into internal tab

    Hi Guys,
          I have a requirement  that  i have to convert the internal table data into xml format and viceversa . for my requirement  i came to know that i have to use Transformations concept.  i done the converting the data from internal table into xml data by using standard Tranformations. My Question is 
    1) Can i use same Transformation to convert the xml data into abap internal table. if it is possible then how ???
    2) Is it possible using the standard Transformation  or I have to go for XSLT approach
    Please help me out from this guys,
    Thanks and Regards
    Koti

    Hi Koti,
    This is possible. There is a link. With the help of this link you can convert ABAP data to XML and vice versa.
    Link: http://www.heidoc.net/joomla/index.php?option=com_content&view=article&id=15:sapxslt&catid=22:sap-xslt&Itemid=31

  • Conversion from "feet to inches"to"meter and centimeters"

    hi,
    i need this answer urgently!!!!
    i'm trying to write a java program that reads lenghts in feets and inches(or meters and centimeters(or feet and inches). the program askes the user if he/she wants to convert from "feet to inches" to "meters and centimeters" or from "feet to inches". The program then preforms the desired conversion.having the user respond by typing the integer 1 for one type of conversion and 2 for the other conversion.The program reads the user's answer and then executes an if-else-statement. each branch of the if-else statement will be a function call. Include a loop that lets the user repeat this computation for new input values until the user says he or she wants to end the program. Use as many method that are logically needed. The main method should do as little as possible.

    I love these questions - especially the little bits at the end that clearly point out it is a homework question.
    As joeldi says, show us that you've had a decent go at it and we'll be more interested in helping out.
    Regards,
    Tim

  • Syncing Labels from Lightroom to Bridge and vice versa.

    The labels in Lightroom over-ride those in Bridge and vice versa.  I have matched the descriptions of the coloured Labels between Lightroom 2.0 and Bridge, yet when I assign eg. a Green Label in Lighroom and then open Bridge, the Label appears White.  If I select those White Labels in Bridge and make them Green, then return to Lightroom and Sync the folder, those formerly Green Labels are converted to White.
    Same thing happens with the Reject Flag in Lightroom.  It appears as a White Label in Bridge, which I can understand and wouldn't be a problem, were it not for other Coloured Labels in Lightroom displaying as White in Bridge.
    Any one have an explanation for this and more importantly a solution.  Thanks.

    I think you have to assign the exact same name to what the colors represent in both Bridge preferences and in Lightroom preferences.
    I don't even remember what the default names Adobe assigns to each of them. I changed the words to the right of the Label colors to read "Red", "Yellow", "Green", "Purple", etc.
    When in Lightroom I have to "Save Metadata to File" and then when I browse to that folder in Bridge I see the correct Label color.

Maybe you are looking for