Accessing the value of a text box input

how do i access the value of a text box on a jsp page..
eg:if the page name is Test.jsp and it has a text box named text.....

You're mixing JSP and JavaScript. If you're staying within the same page, e.g. no get/post to another JSP, and you need to update values of a text field within a form, use pure JavaScript, such as:
<form name="fred">
<input type="text" name="USERID" size="15" onBlur="document.fred.PASS.value=document.fred.USERID.value;"><br>
<input type="text" name="PASS" size="15"><br>
</form>
This will change the value of the PASS field to the same as the USERID field, which is what I think you were trying to do.
Not to be rude, but in the interest of keeping the Java forum pure, I would look towards a JavaScipt forum if you wish to use pure JavaScript (http://freewarejava.com/cgi-bin/forumdisplay.cgi?action=topics&number=1&SUBMIT=Go)
bRi

Similar Messages

  • Get the value of output text box in javascript

    Hi all,
    I am trying to retreving the value of output text box using getElementById('form1:outputText3') but was not able to get it.
    Googled it but didnt find any way to get it on the page itself without going to backing bean
    jdeveloper version 10g
    Thanks in advance

    Hi,
    I think this is because out put text is not a component but text written to the page. So I thin you would have to parse the generated HTML for it or use a inputText field and set it to read only
    Frank

  • How to retreive the value of a text box that is created dynamically

    hi this is ravi kiran,
    i am working on a project which requires creation of as many text boxes as the number records fetched from the database i.e, if the result set contains 3 records three text boxes must be created.
    here is the code for that
    if(rs1.next()) { %>     //rs1 is the result set object
    <tr>
    <td width="130" ><%= rs1.getString(1)%></td>
    <td width="130" ><%=rs1.getString(3) %></td>
    <td width="184" ><%= rs1.getInt(2)%></td>
    <td width="149"><input type=text size="20" ></td>
    </tr>
    %>
    here the problem is the text boxes are getting created but what ever the value that is entered in the created text boxes must be added and must be displayed in another text box.
    i am having no idea how to do this
    can any one help me
    thanx in advance.

    may be this helps u ,
    Create a counter and increment it every time when it comes to rs.next
    Set ids for the text box with the value of the counter.
    eg: textbox1 , textbox2
    the 1 and 2 shld be created by the counte just append the count value to the string and set it as id of the new text box dinamically created.
    then get the ement by id and get its value and do the process.

  • How do I populate form fields depending on the value of a list box?

    Hi,
    Can anybody help me out here?
    I'm creating a form where I'm needing to populate a number of fields (first name & last name) based on the value of a list box (values are 1,2,3,4,5,6) ie: if 3 is selected 3 sets of the first name and last name fields populate on the page for the user to fill out.
    At this stage it is just a prototype site and there is no database running behind it.
    Thanks
    Hayden

    This can only be solved if you have javascript coding skills.  Without knowing more about what you want to do and why, I can only show you a skeleton of how your code should look, but consider this form select field -
    <select onchange="populateForm()">
    When a value is selected from that list, the "onchange" event will fire, and will call the javascript function called populateForm().  You need to define a function by that name somewhere on the page -
    <script type="text/javascript">
    //<![CDATA[
    function populateForm(value) {
         if value >0 { document.getElementById("fieldID").style.display='block' }
         if value >1 { .... }
         etc.
    //]]>
    </script>
    The page itself would need to have ALL the fields already in the form, but with those that are to be revealed set to a style of display:none.
    Obviously, this is a skinny skeleton.  Each test in the function would reveal a new field on the page by changing its display style from "none" (which is how they should be set in the code) to "block".  You would need a separate function for each type of field that might need to be chosen.
    If this is well over your head, then I'm afraid you will be out of luck for this particular approach....

  • Clear values of a text box?

    Hello,
    Pretty simple one, I think. When I go back to a page I've been to already, a value that I put in the text box is still there. How do I force that to be clear each time?
    Thanks very much,
    -Adam

    How are you navigating away from the page which has the text box? Do you have a "Cancel" button? Or do you click on a link? Either way, you can clear the cache if you don't want to see the old value in your text box. If it's a button, you can clear the cache by specifying the page number or just the item name. You can also clear the cache by indicating the page number or items in your exit point URL link.
    Jerry

  • Map var value in dynamic text box

    I written public function in public class ,my problem is that I will like to map the trace value in dynamic text box which is on the  stage of fla fil, It shows trace value properly but  If  I pass the var value like msg1.text = (processCode);
    it doesn’t work It shows an error 1046: Type was not found or was not a compile-time constant: text.
    public function Code:
      public function processResponse(rcvParametersArray:Array):void {
                var processCode:int=rcvParametersArray[0];
                var homeTypeID:int=rcvParametersArray[1];
                var homeTypeID:int=rcvParametersArray[2];
                var numhome:int=rcvParametersArray[3];
                var homeInfo:Array=new Array(numHomes);
                var i:int=4;
                for (i = 4; i < (numhomes+4); i++) {
                    homeInfo.push(rcvParametersArray[i]);
                var msg1:text;
                var numOnlinePlayers:int=rcvParametersArray[i];
                var serverTime:String = rcvParametersArray[(i+1)];
                 msg1.text = (processCode);  
                trace("Action Code " + process);
                trace("Game Type " + gameTypeID);
                trace("Home Type " + tableTypeID);
                trace("Number of Homes " + numHomes);
               msg1.text=actionCode;

    Following is not the correct way to create a text box dynamically.
    var msg1:text;
    You should use the following to create the text box
    First drag one text box to stage and delete it. It will add required graphics to your library then import the classes using
    import flash.text.TextField
    Now create the text box
    var msg1:TextField = new TextField();

  • How to get multiple row values in one text box while clicking one row from grid?

    hi friends,
               i am working on flex4 web application i am using  one datagrid ,it have two records(bills),one button and one text box.
    ex:
    customername      salesrepname   receipt no      amount
    venkat                         raj                         1102          10000
    ramu                          ramesh                   1102         20000
    here both receipt no is same.now i want to select one of this receipt and click pay button which is place in outside the grid.
    now my need is after click the pay button in text box i need 10000+20000=30000,after click that button i want both receipts should be invisible...'
    how i will do this,
    any suggession,
    Thanks
    B.venkatesan

    One way with 10g:
    select mgr,
           rtrim(xmlagg(xmlelement(empno,empno||',').extract('//text()')),',')  emps
    from emp
    where mgr is not null
    group by mgr;10g:
    -- define this function:
    create or replace
    function concatenate(c Sys_refcursor, sep varchar2 default null) return varchar2
    as
      val varchar2(100);
      return_value varchar2(4000);
    begin
    --  open c;
      loop
      fetch c into val;
      exit when c%notfound;
      if return_value is null then
        return_value:=val;
      else
        return_value:=return_value||sep||val;
      end if;
      end loop;
      return return_value;
    end;
    select mgr,
           concatenate(cursor(select empno from emp e where e.mgr=emp.mgr order by empno),',')
    from emp
    where mgr is not null
    group by mgr;With 11g:
    select mgr,
           listagg(empno,',') within group (order by empno) emps
    from emp
    where mgr is not null
    group by mgr;

  • The curser includes a text box from a previous image or link when the curser is positioned on the side of the page. i click and it goes away but only to return again on the next launched page. how do i get rid of this?

    the cursor includes a text box from a previous image or link when the cursor is positioned on the side of the page. it will mainly happen when i hit "back" from the page i was on. i click and it goes away but only to return again on the next launched page. i also keep several tabs open and it will carry over to any one of them i go to. how do i get rid of this?
    == This happened ==
    Every time Firefox opened
    == when i upgraded to most recent version 3.6.8

    A number of extensions can cause that problem, you'll need to do a little troubleshooting to find out which extension is causing that to happen for you.
    [http://support.mozilla.com/en-US/kb/troubleshooting+extensions+and+themes]

  • How can I access the values in ProfileArray of a CWIMAQProfileReport?

    Hi all,
    I'm not sure if this is the right board, but I didn't find one related to VB and NI Vision.
    I'm using LineProfile2 from CWIMAQVision1 which gives me a ProfileArray which is a variant. I'd like to access the
    values in the array. Normally I would do it like
    Report(1).ProfileArray(i)
    but that does not work. I can get the bounds of the array with LBound and UBound. I can observe the array in 
    debug modus and it contains reasonable values.
    How can I get access to the contents of the ProfileArray?
    Thanks in advance
    Axel

    Hi Elmar,
    thanks for paying attention to my problems.
    I use Vision 8.5. My email adress is [email protected]
    I don't need the hole intensity of the image/2D array. I only need the
    intensity values of a given line which should be a 1D array of bytes.
    I use the following command
            CWIMAQVision1.LineProfile2 Image, Line, Report
    When I understood the command correctly the intensity values are
    in the Report. I would get them with 
            Report(1).ProfileArray(i)
    But that does not work. I get a runtime error #450.
    Other stuff with the report works and gives reasonable values e.g.
                Report(1).PixelCount
                LBound(Report(1).ProfileArray)
                UBound(Report(1).ProfileArray)
    Or passing the hole array to plot the values also works
            frmLineProfile.CWGraph1.PlotY Report(1).ProfileArray
    Best regards,
    Axel

  • Problem in Showing multiple values into one text box.

    Hi all,
    How can show i multiple row values into one text box. here text box is multi line type.
    i have one table it has content column, it has number of rows. i need to show those data into one text box in form. how can i solve it?
    my sample code here,
    egin
    --:block3.txt_to := :parameter.p_current_user||''||':'||:block3.txt_From;
    -- go_item('txt_from');
    insert into chat(fromid,toid,content)values(:block3.fromid,:block3.toid,:block3.txt_From);
    :block3.txt_From:= null;
    commit;
    :block3.txt_to := :parameter.p_current_user||''||':'||:block3.txt_From;
    go_item('txt_from');
    declare
    cursor c4 is select content from chat where toid = :block3.fromid;
    rec1 c4%rowtype;
    begin
    open c4;
    loop
    fetch c4 into rec1;
    exit when c4%notfound;
    null;
    end loop;
    end;
    --select content into :block3.txt_to from chat where toid= :block3.fromid;
    end;
    please give me some tips to solve it.
    thanks
    gurus

    Hi,
    Try giving CHR(10) for line feed.
    DECLARE
         CURSOR C4 IS SELECT CONTENT FROM CHAT WHERE TOID = :BLOCK3.FROMID;
         Str_Temp VARCHAR2(20);
    BEGIN
         :BLOCK3.TXT_TO := '';
         OPEN C4;
         LOOP
              FETCH C4 INTO Str_Temp;
              EXIT WHEN C4%NOTFOUND;
              :BLOCK3.TXT_TO := :BLOCK3.TXT_TO || CHR(10) || Str_Temp;
         END LOOP;
         CLOSE C4;
    END;Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • How to access the value of a field of a field symbol.

    Hello All,
    i need to access the value of a field in a field symbol. But when i am trying to get the value like <FS>-POSNR, it's showing that that the <FS> has no structure.
    In my program, the field itself that i need to check should be dynamic. ie i'll get the field in a variable and i need to find the value of that field.
    Am pasting my code below, please tell me what needs to be done.
    here in my sample code i am moving the entry of the <FS> into a work area structure. But in my actual program, i gets the structure as a parameter. So is there any way i can declare a work area dynamically...
    FUNCTION z_39181_dyn_fs_60758.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(PARAMETER) TYPE  VBELN
    *"  TABLES
    *"      DATA_TAB
      BREAK-POINT.
      FIELD-SYMBOLS <fs> TYPE ANY.
      FIELD-SYMBOLS <fs1> TYPE ANY.
      FIELD-SYMBOLS <fstab> TYPE ANY TABLE.
      DATA name(5) VALUE 'POSNR'.
      FIELD-SYMBOLS <f> TYPE ANY.
      DATA: dref TYPE REF TO data,
            dref1 TYPE REF TO data,
            dref2 TYPE REF TO data.
      DATA: lv_lips TYPE string.
      DATA: lv_lipsfld TYPE string,
                lv_fld TYPE string,
                lw_lips TYPE lips.
                lv_lips = 'LIPS'.
                lv_fld = 'LW_lips-POSNR'.
      CREATE DATA dref1 TYPE (lv_lips).
      CREATE DATA dref TYPE STANDARD TABLE OF (lv_lips).
      CREATE DATA dref2 LIKE LINE OF data_tab.
      ASSIGN dref->* TO <fstab>.
      ASSIGN dref1->* TO <fs>.
    assign dref2->* to <fs
      <fstab> = data_tab[].
      LOOP AT <fstab> INTO <fs>.
        lw_lips = <fs>.
        WRITE lw_lips-vbeln.
        ASSIGN (lv_fld) TO <fs1>.
       write <fs>
      ENDLOOP.
    Helpful answers will be rewarded...

    Use syntax
    ASSIGN COMPONENT name OF STRUCTURE struc TO <fs>.

  • Is it possible to change the size of a text box on a photo book page

    I am a first-time user of the photo book application in iPhoto. I am wondering if it is possible to:
    1. change the size of a text box
    2. have more than one text box on a page
    3. move the text box around.
    Thanks, in advance, for any suggestions someone might have.
    newtongrammy

    I am a first-time user of the photo book application in iPhoto.
    I also was a first-time user, so I started using it. Exploring the possibilities, learning my way around.
    Thanks, in advance, for any suggestions someone might have.
    Click the ? icon
    Oops. Sorry, but you're in the wrong forum : iLife > iPhoto

  • How to change the font size of Text Box  Properties Appearance tab into 2 decimal digit.

    How to change the font size of Text Box  Properties Appearance tab into 2 decimal digit. I am uanble to modify it to 5.38 pt for example. Its only allowing to 1 decimal place.

    Click on each field and the choose Properties from either File menu (or if on Mac hold dow mouse button until context menu appears choose properties)
    go to Font
    choose desired size and type font,you can choose to make this the default.
    Do this with each field.
    Or if you have a lot of fields:
    while one is selected select all of them
    then go to fonts in properties
    change Font and size and make default.

  • How to change the font size of Text box tool ?

    How to change the font size of Text box tool ?
    I am using Acrobat PDF 6.0
    Tools > Advanced Commenting > Text Box Tool
    I need to know how to change the font size. The default font size is too big.
    let me know
    Thanks

    I do not have AA6 available right now (I can check at home this evening). I am also using AA Pro, not Std. In AA7, there is a text box tool that is a commenting tool. When I started typing, a properties toolbar came up that had the font size and such. I haven't figured out how to get the toolbar after the fact. In AA8, I selected the text box tool and then went to view and selected the properties bar (the font size and all showed then), or use Ctrl-E when editing the text. I have not been able to figure out how to edit the text in a text box after you have created it - think it is a mental block right now. Bill

  • My mac keeps highlighting different boxes all the time and a text box has appeared on the screen that says what box is highlighted if the sound is turned up when you press a key or click on a box you are informed of the action any ideas what i can do?

    Hi my Mac keeps highlighting different action boxes (on its own) all the time a strange text box has appeared on the screen that informs you if you press a key or click on a item. if the sound is turned up you are informed when a item is highlighted or a you click on a item HELP!

    Hi Thanks for your help fixed the problem
    Kind Regards
    Nannedee

Maybe you are looking for