Placing variables from db table in div vs form input fields

Hello,
Because of all the help I've received on this forum, I'm getting comfortable with reading data from db tables and writing back to them.
Recently I've needed to create an "update" of a form (no refresh) where
1 -  the data are read in from a table to a form
2 -  the form data are changed by the user, and
3 - the data are written back to the table.
To do this, I've learned about parsing and displaying returned json data from a "success" under ajax.
Here's a "mini" example of what I've learned:
        success: function(result)
        $('#loadmehere1').html(result['localid']);
       $('#inload1').val(result['localid']);
       error : function() { alert("error"); }
});//End of ajax call
So with my experimentation, I've found that ".html" is used to fill a div, and you have to use the ".val" to fill an input box on a form.
My questions are:
1. Can you point me in the right direction to learn about why an input statment needs a ".val" and a div can take an ".html"?
2. Would you populate divs and input statements with different commands?
Thanks very much!

This forum is not about JS in HTML files. Only in PDF files. From your
profile it seems you previously posted questions in the Dreamweaver
forum... That's probably a suitable spot for this question as well.

Similar Messages

  • Fill Variables From a Table

    I have a requirement to write a query which is much like an aged debt report.
    I would have a number of variables which will allow the user to create buckets of data, i.e. invoices that are not yet due, 30 days overdue, 60 days overdue, 90 days overdue, etc. However, the data will be coming from CRM, and I would like to pre-fill the variables from a table, and not have the user enter them every time they wish to run the query. The table containing the variable values will also be extracted from CRM into BW.
    Does anybody have any idea how I can pick the bucket parameters up to use in my query?

    Stuart,
    if you know already how to build and fill this kind of variable (but for other purpouse), you start from a very good point !!!
    It's enough to do a select onto the table on which you pass the relevant values (do you need some ABAP sample ? with the search engine you can find a lot of good example) ...or do you have problem to pass these values from CRM environment...let us know if you need some more specific!
    Bye,
    Roberto
    (about point, I think it's enough to hit the radiobutton that you should find in every answer...if there is some problem, write an e-mail to [email protected] or wait for some minute..)

  • Create shared variables from a table

    hi!!
    well, what i want to do is to create a shared variable using a table, with variables names and values i want to take them,
    i have a litte example, to see how can i take the name of the shared variables from a table,
    can you help me??
    thanks
    Attachments:
    Shared Variable.vi ‏28 KB

    HI!!
    i have done a program, where i create a sv library, after that i deploy it and finally i want to write something on this sv that i created...
    all runs ok, but i  cant see what i am writting in this sv, for that i choose the NI distributes system manager,
    can someone help me please????
    i think is because the type of data...
    thanks!
    Attachments:
    SV_create_deploy_write.zip ‏34 KB

  • Include space between two variables from internal table

    Hi Experts,
    I have an internal table with 4 fields with values for a b c d , i have to arrange them in the specific order so that i can download all the data in a text file.
    the first 3 variables are already arranged , the format is a bc, but the var d should be put in a specific positon after predefined spaces from var c.
    Please refer below for the sample of of the output text file. In this example:
    a = A20N
    b = 7227802
    c = 0300207
    d = 010109
    Space between c & d is determined by a POS variable in internal table
    a        b         c                                          d                       
    A20N 72278020300207                               010109     
    A20A 72278020300207        21     
    A20N 72278020300207          2511100     
    A21F 72278020300207        Van Capellen     
    A21G 72278020300207        Tim     
    A20E 72278020300207                    1     
    A20T 72278020300207        2     
    A20T 72278020300207                                                   1     
    A20E 72278020300207                    01     
    A20E 72278020300207                        Vilvoorde     
    plz help me out as i have to resolve this as soon as possible.

    Hi,
    Check this sample code using offsets, and modify as per ur requirement.
    DATA : L1 TYPE I.
    DATA : L2 TYPE I.
    DATA : L3 TYPE I.
    DATA : BEGIN OF ITAB OCCURS 0,
           A(30) TYPE C,
           B(30) TYPE C,
           C(30) TYPE C,
           D(30) TYPE C,
           POS(2) TYPE C,
           END OF ITAB.
    DATA : TEXT(120) TYPE C.
    START-OF-SELECTION.
    BREAK-POINT.
      ITAB-A = 'ABC'.
      ITAB-B = 'IND'.
      ITAB-C = 'CATOR'.
      ITAB-D = 'FINAL'.
      ITAB-POS = '3'.
      APPEND ITAB.
      CLEAR ITAB.
      LOOP AT ITAB.
        L1 = STRLEN( ITAB-A ).
        L2 = STRLEN( ITAB-B ).
        L3 = STRLEN( ITAB-C ).
        TEXT = ITAB-A.
        L1 = L1 + 1.
        TEXT+L1 = ITAB-B.
        L1 = L1 + L2.
        TEXT+L1 = ITAB-C.
        L1 = L1 + L3 + ITAB-POS.
        TEXT+L1 = ITAB-D.
        CLEAR L1.
        CLEAR L2.
        CLEAR L3.
      ENDLOOP.
      WRITE : TEXT.
    Rgds
    siva

  • How to Find out the from which table we can get the following fields?

    The following fields are from invoice data
    How to  know or from which table we get the following fields:
    Header Details:
    Manifest:, Finance Control #:, Alternate SID:, Carrier:, Container/Trailer #:, Hazmat Code:, Harmonizing Code, Freight Forwarder, Fiscal Rep., Ship From,  Notify Party
    Item Details:
    VAT/Tax Rate %, VAT/Tax Amount, Measurements, Net Weight, Gross Weight
    thanks

    Dear Krishnama
    Place your mouse on the required fields and press F1.  A box with header Performance Assistant will appear in front of you where you select "Technical information" (icon like hammer and spanner). 
    You can now see what table it is.
    thanks
    G. Lakshmipathi

  • Pressing tab key within table not scrolling to next input field

    Hi All,
    I have a table with editable and read only fields. I have more than 20 columns. When the tab Key is pressed it scrolls only to the editable fields that are in the visible screen. It does not scroll the table to the right to the next input field.
    However if I change the screen size so that the scroll bar is required for the browser then it will scroll across moving the browser scroll bar, moving the cursor to the input field that was not visible. Again it does not go further moving the scroll bar within the table to the next editable field to the right.
    The table has been set to scrollable with the scrollable column count set to 8.
    We are using explorer 8 on 7.01
    Is it possible to have the tab key move from input field to input field scrolling the table to the next input field if it is not visible yet?
    Thanks
    Bruce

    What you describe sounds like the correct functionality.  If you set a scrollable column count, only the visble rows are actually rendered on the client side.  When you use the horizontal scroll bar, you are triggering a server side event to retrive the next set of visible columns.  Therefore the browser doesn't actually know anything about non-visible columns and hence the tab can't go to them.
    When you increase the number of visible columns (or don't set anything for visible column) you render al the columns on the client side and use the browser scrolling.  Therefore the tab works.

  • Set substitution variable from Sql table

    Hi guys,
    I am new to sql/unix so I hope you can guide me in the right direction.
    whats the easiest way to update an essbase subvar from a sql table?
    would I have to write a sqlplus statement to output the variable to file,
    read the file in a maxl command and set the variable and call these commands using .sh script and esscmd?
    is there a more efficient way to set the variable? e.g only use sqlplus and esscmd?
    thanks in advance,

    Try something like this
    echo off
    sqlplus -s username/passwordusername/password@server/SID:@server/SID:port @test.sql > variable.txt
    for /f "usebackq delims=" %%a in (variable.txt) do set CurrentMonth=%%a
    echo %CurrentMonth%
    See whether you are getting the correct month.
    Regards
    Celvin
    http://www.orahyplabs.com

  • Populate variables from int table

    Hello
    There is internal table with fields VNAM , VALUE
                                                         VAR1     100
                                                         VAR2     200
                                                         VARn      XXX
    There is a list of variables VAR1, VAR2. ....VARn.
    How to populate VAR1 -VARn with corresponding values from the internal table.
    I just need an intelligent approach.

    Hi,
    this code will help you
    TYPES: BEGIN OF ts_data,
    vnam TYPE string,
    value TYPE string,
    END OF ts_data.
    DATA:
      lt_data TYPE STANDARD TABLE OF ts_data,
      ls_data TYPE ts_data,
      lv_test type char30.
    FIELD-SYMBOLS:<lv_field> TYPE ANY.
    ls_data-vnam = 'LV_TEST'.
    ls_data-value = 'TEST text'.
    APPEND ls_data TO lt_data.
    LOOP AT lt_data INTO ls_data.
      UNASSIGN: <lv_field>.
      ASSIGN (ls_data-vnam) TO <lv_field>.
      IF <lv_field> IS ASSIGNED.
        <lv_field> = ls_data-value.
      ENDIF.
    ENDLOOP.
    Regards Marcel

  • Generating XML from relational tables and storing back in CLOB field

    I have been reviewing the documentation and trying to figure out the best approach. I am on v 10.2.0.3 and need to select from a parent table and three child tables and want to generate the results as xml that I will place in a clob field in another table. I looked at XMLQuery and dbms_xmlgen.getxml. The difference appears to be that getxml allows you to code traditional sql to join the tables.
    I would greatly appreciate it if someone could provide some feedback and any sample code along the line that I describe above.
    Thank you in advance for your help!
    Jerry

    Any feedback to the above questions would be greatly appreciated!

  • How to Read data from a table which is defined as a field in another table

    Hi
    Iam working with FM: 'CUCB_GET_CONFIGURATION'
    <b>  Import parameter configuration as a table.</b>
      <u>but configuration has another table as a field.</u>
    i want to read the inner table fields.
    how can i read the table which is defined as field in configuration table.
    Please try to give me a solution.
    can i have the declartions too....
    Thanks,
    sri

    Hi jonnakuti,
    1. simple
    2.
    DATA : CONFG      TYPE IBCO2_INSTANCE_TAB2.
    <b>DATA : WA TYPE LINE OF IBCO2_INSTANCE_TAB2.</b>
    3. just copy paste
    4.
    report abc.
    TYPE-POOLS : IBCO2.
    DATA : INSTANCE     TYPE     CUIB_CUOBJ.
    DATA : CONFG      TYPE IBCO2_INSTANCE_TAB2.
    DATA : WA TYPE LINE OF IBCO2_INSTANCE_TAB2.
    CALL FUNCTION 'CUCB_GET_CONFIGURATION'
      EXPORTING
        INSTANCE                           = INSTANCE
      IS_BUSINESS_OBJECT                 =
      IV_MOMENT                          =
      IV_WITH_DB_INSTANCE                =
    IMPORTING
      IBASE                              =
       CONFIGURATION                      = CONFG
      EO_CBASE_REF                       =
    EXCEPTIONS
       INVALID_INPUT                      = 1
       INVALID_INSTANCE                   = 2
       INSTANCE_IS_A_CLASSIFICATION       = 3
       OTHERS                             = 4
    read like this
    LOOP AT CONFG INTO WA.
    ENDLOOP.
    regards,
    amit m.

  • When i press tab button into Text Field data automatically show from existing table in new Window form

    Hi Expert team
    please give me solution as soon as possible

    Thank you for your reply, Paul.  Unfortunately this suggestion didn't solve the issue.
    After experimenting with it for a bit, it seemed that it might be related to widow/orphan control, but it occurs even with widow/orphan control turned off.
    Does anyone out there have any suggestions?
    Thanks,
    Jason

  • How to pass value from new pop up window to the input field

    Hi,
    i have a F4 help on a input type field and adjacent to that two more input fields, on clicking the help on the first input field a new pop up window opens, the value in this pop up window is to be selected to give the value in that field and the other two values should be appeared in the input type. suppose the pop up window has three fields "15   LIMA  PLANT   45802 ", so on clicking it in input field only 15 should go to the firstinput fields and "LIMA PLANT" and "45802" should go to new window
    do anyone know this?

    avoid duplicate threads
    F4 help in dropdownlistbox and values in input fields
    if you feel that the thread heading or content is not what you wanted, you can edit it and leave a note in the same thread that you have edited it.
    Raja

  • How can we restrict the f4 help from check table in the pop up form.

    Hi,
    I am trying to control the F4 help values from check table coming in the form of pop up.

    When a user uses SM30 to add an entry into table, you often need to add more checks. If you were to add code inside, there is a big chance that it would be overwritten.
    The solution: go to table maintenance generator ( se56) => Enviroment => add event.
    [To add event in table main.|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8129f164-0a01-0010-2a8e-8765287250fc]

  • Module pool transfer of data from one table control to another

    Hi all,
    I have been assigned to module pool object wherein i have to display table control on screen and that table control contains only 10 rows on screen for display. Now my internal table it_out has 15 rows
    Describe table it_out
    line v_l.     " v_l  = 15.
    There is a pushbutton below table control and when i select multiple rows and click on that pushbutton it will navigate me to the next screen containing another table control on which i need to display those selected records.
    Now the problem is that when i select first record and move cursor down to select last record then i am seeing only last record on next screen table control. why is it happening? please provide me with solution. For rest of cases it is working fine for example if i select first record and second record then i am seeing both these selected records on next screen table control . Only the problem arises when i tried to select first and lets say last record when scrolling down on table control.
    I think the problem is with scrolling but when i loop on next screen with moved records i am seeing that 2 records are their but it is transferring only one record to next screen not the last one.
    Your response is highly appreciated.
    Thanks
    Parag

    Hi Parag,
    Screen 8002 (with table control) --> select records --> press a button --> move to screen 8003 --> display selected records in screen 8002.
    First problem that if you select first record in table control and scroll to end to select the last record, the first record in deselected.
    Next problem, that if you select say 3 records in table control you want the to be displayed in another table control, the use this code.
    Also take another internal table and work area same as the initial internal table and work area used in screen 8002.
    On screen 8002, take a button with function code 'PROCESS', on which user clicks the screen 8003 should display selected records.
    Now, use this code, its working:-
    Take the names of the input/output fields as work_area-field_name and select column in table control as work_area-flag.
    Also take a flag field of size 1 datatype character as the last field in the internal table and work area while declaration.
    You must have passed a code in PBO of the screen for reading internal table into the table control.
    So it reads the internal table into the table control whenever you perform any action on use command.
    All you need to do is to write a code to modify the internal table form the table control while performing any user action.
    Remember to change the LINE SEL option in attributes of table control as MULTIPLE.
    At Screen Logic:-
    PROCESS BEFORE OUTPUT.
      MODULE status_8002. "for pf-status
      LOOP WITH CONTROL po_tab. "po_tab is name of table control
        MODULE pass_data. "to pass data into table control from internal table
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_8002. "to handle other user commands (back and exit)
      LOOP WITH CONTROL po_tab. "po_tab is name of table control
        MODULE modify_data. "to modify data from table control into internal table
        MODULE process_data. "to display selected records on another screen
      ENDLOOP.
    In PBO,
    *&      Module  STATUS_8002 OUTPUT
    MODULE status_8002 OUTPUT.
      SET pf-status 'ZAB_PFSTA'. " pf-status
      DATA : line_count TYPE i.
      DESCIRBE TABLE it_ekpo
      LINES line_count.
      po_tab-lines = line_count + 10.
      " to make table control scrollable
    ENDMODULE.                 " STATUS_8002  OUTPUT
    *&      Module  PASS_DATA  OUTPUT
    MODULE pass_data OUTPUT.
      READ TABLE it_ekpo into wa_ekpo INDEX po_tab-current_line.
    ENDMODULE.                 " PASS_DATA  OUTPUT
    "it_ekpo is internal table and wa_ekpo is the work area
    In PAI,
    *&      Module  MODIFY_DATA  INPUT
    MODULE MODIFY_DATA INPUT.
      MODIFY IT_EKPO INDEX PO_TAB-CURRENT_LINE FROM WA_EKPO.
      "modify records from table control into the internal table
    ENDMODULE.                 " MODIFY_DATA  INPUT
    *&      Module  PROCESS_DATA  INPUT
    MODULE PROCESS_DATA INPUT.
      CASE sy-ucomm.
        WHEN 'PROCESS'.
          IF wa_ekpo-flag = 'X'.
            wa_ekpo1 = wa_ekpo.
            APPEND wa_ekpo1 TO it_ekpo1. "if record selected move to another internal table
          ENDIF.
      ENDCASE.
      "modify records from table control into the internal table
    ENDMODULE.                 " PROCESS_DATA  INPUT
    Now if you select some records in this table control the values will retain in internal table.
    Screen 8003 with selected records to be displayed in another table control.
    At Screen Logic:-
    PROCESS BEFORE OUTPUT.
      MODULE status_8003. "for pf-status
      LOOP WITH CONTROL po_tb. "po_tb is name of table control
        MODULE pass_data1. "to pass data into table control from internal table
      ENDLOOP.
    PROCESS AFTER INPUT.
      MODULE user_command_8003. "to handle other user commands (back and exit)
      LOOP WITH CONTROL po_tb. "po_tb is name of table control
        MODULE modify_data1. "to modify data from table control into internal table
      ENDLOOP.
    In PBO,
    *&      Module  STATUS_8003 OUTPUT
    MODULE status_8003 OUTPUT.
      SET pf-status 'ZAB_PFSTA'. " pf-status
      DATA : line_count1 TYPE i.
      DESCIRBE TABLE it_ekpo1
      LINES line_count1.
      po_tb-lines = line_count1 + 10.
      " to make table control scrollable
    ENDMODULE.                 " STATUS_8003  OUTPUT
    *&      Module  PASS_DATA1  OUTPUT
    MODULE pass_data1 OUTPUT.
      READ TABLE it_ekpo1 into wa_ekpo1 INDEX po_tb-current_line.
    ENDMODULE.                 " PASS_DATA1  OUTPUT
    "it_ekpo is internal table and wa_ekpo is the work area
    In PAI,
    *&      Module  MODIFY_DATA1  INPUT
    MODULE MODIFY_DATA1 INPUT.
      MODIFY IT_EKPO1 INDEX PO_TB-CURRENT_LINE FROM WA_EKPO1.
      "modify records from table control into the internal table
    ENDMODULE.                 " MODIFY_DATA1  INPUT
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • How to fetch the data from the table COEP for WBS element,cost center,,,,,?

    Hi,
    I would like to retrive the data from the table COEP ,based on KOKRS,BELNR fields.
    I need the output for Cost centre, cost element, wbs element,net work ,activity.
    These values are storing OBJNR ,OBJNAR_1,OBJNR_2,OBJNR_N3.
    But here always these field are not giving the correct values.
    for example : for one record COST CENTRE vlaue is storing in OBJNR_1 field,
                        for one record COST CENTRE vlaue is storing in OBJNR_2 field,
                       for one record  COST CENTRE vlaue is storing in OBJNR_3 field.
    Here SAP has used a generic approach for this.
    How can I dispaly the values in this case ?
    Thanks and Regards
    Srinivas.N

    Hi,
    I am asking, how can we say OBJNR_1 value alwyas belongs to cost center ?
    USPOB is not filling always.

Maybe you are looking for

  • My iMessage in my friends's phone!!!

    My friend used my Apple ID to download an application in her phone. Later on all my iMessage appear in her phone, how can I stop that!?

  • Need SD,MM  real time scenarios

    hi everyone, Plz help me with SD real time scenarios with examples.. regards, prashanth

  • Need help with importing data in partition table

    Hi, DB:8.1.7 OS: win 2003 server I have a table which is 4.5GB in size. I created a new partition table,with local indexes. I exported the original table with all indexes,triggers and procedures. After creating the empty partitioned table,i imported

  • DREAMWEAVER CRASHES IS COSTING ME MONEY IN PRODUCTION TIME!

    OK I AM GOING TO WRITE IN CAPS BECAUSE THIS IS A FUCKEN DISGRACE! WE INVESTED IN THE ADOBE PRODUCTION PACKAGE AND ONE OF THE MAIN REASON WAS DUE TO DREAMWEAVER. NOW WE CANT EVEN GET THIS BLOODY APP TO WORK FOR MORE THAN 2 MINS WITHOUT IT CRASHING. IT

  • Youtube videos show blank

    If I go to Youtube, all videos show blank. No video. No playback. Nothing. Just a blank white area where the video should be. No problem with Firefox. What is going on? Safari 4.0.5 on Mac OS X 10.6.3.