How can I return some values from an applet invoked by jsp:plugin tag

My JSP is something like that:
<html>
     <head>
             <title> . . . </title>
     </head>
     <script>
          function getValueFromApplet()
               var src = document.pinApplet.checkPin();
               document.myForm.j_username.value = document.pinApplet.tokenizeName(src);
               alert(document.myForm.j_username.value);
               document.myForm.j_password.value = document.pinApplet.tokenizePassword(src);
               alert(document.myForm.j_password.value);
     </script>
        <body>
                <jsp:plugin type="applet"
                      code="PinApplet.class"
                   codebase="/idp"
                   name="pinApplet"
                            width="300"
                            height="300">
                     <jsp:fallback> Authentication Form is not supported by the browser </jsp:fallback>
          </jsp:plugin>
                <form action="https://xxx.xxx.xxx"
               name="myForm"
               method="post" onSubmit="return getValueFromApplet()">
          <table>
               <td><input type="submit" value="OK" >
               <td><input type="hidden" id="j_username" name="j_username" value=""></td>
               <td><input type="hidden" id="j_password" name="j_password" value=""></td>
          </table>
          </form>
     </body>checkPin() returns "alice--alice"
tokenizeName() returns the first token: alice
tokenizePassword() returns the second token: alice
When I test the applet in the IDE, it returns the values properly, but not in the JSP invokation.

evnafets wrote:
javascript will not be executing on the server. You can rule that one out.
Is your Applet being initialised correctly?
Where have you got the classes for it? I think the applet doesn't need any kind of initialization, because it doesn't have any variables and all the process is made in the method called by onsubmit()
The applet is composed only by one class and I'm totally sure that the class is placed in the correct place.
evnafets wrote:
I would say put in a couple more alerts - one before the call to the applet, one after.
put some logging statements in your applet to see if it gets there.In the javascript, there are two alerts between the three calls to the applet. Where do you advise me to put more alerts?
I don't understand what do you refer when you say "logging statements"
I am going to test again the call to the applet in order to find some kind of code that can be invalid or that can make the function to "crash"

Similar Messages

  • F4IF_INT_TABLE_VALUE_REQUEST - how can I return all values from the line?

    Hi,
    I'm using FM F4IF_INT_TABLE_VALUE_REQUEST to show a pop-up with my internal table values.  The internal table has 3 fields, ATINN, ATZHL and a description field ATWTB.  ATINN and ATZHL are needed to complete the unique table key, however this FM will only return the value of one field in any line I select.
    How can I see all the values in the line I select in the return table?
    My code is as follows:
      DATA: tbl_cawnt LIKE cawnt OCCURS 0,
            wa_cawnt LIKE cawnt,
            BEGIN OF tbl_list OCCURS 0,
              atinn LIKE cawnt-atinn,
              atzhl LIKE cawnt-atzhl,
              atwtb LIKE cawnt-atwtb,
            END OF tbl_list,
            wa_list LIKE tbl_list,
            tbl_return LIKE ddshretval OCCURS 0,
            wa_return LIKE ddshretval,
            tbl_fields LIKE dfies OCCURS 0,
            tbl_dynp LIKE dselc OCCURS 0.
      REFRESH: tbl_list, tbl_cawnt.
      SELECT atinn atzhl atwtb
        FROM cawnt
        INTO CORRESPONDING FIELDS OF TABLE tbl_cawnt
        WHERE spras EQ sy-langu.
      LOOP AT tbl_cawnt INTO wa_cawnt.
        CLEAR wa_list.
        MOVE: wa_cawnt-atwtb TO wa_list-atwtb,
              wa_cawnt-atinn TO wa_list-atinn,
              wa_cawnt-atzhl TO wa_list-atzhl.
        APPEND wa_list TO tbl_list.
      ENDLOOP.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ATWTB'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          value_org       = 'S'
        TABLES
          value_tab       = tbl_list
          return_tab      = tbl_return
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Thanks!

    Hi,
      Use the structure DYNPFLD_MAPPING
    With this internal table you can easily define that you want to return
    other columns of the hit list in addition to field RETFIELD to the
    screen.
    In this IT you can MAP the screen fields to the serch help screen fields this has three fields
    FLDNAME this is the field anme from the search help
    FLDINH This has to be blank which would be field with the field value that you want to map
    DYFLDNAME THis is the screen field name.
    So here you can get the values for the other fields that you want which are on the search help just populate the name of the fields in FLDNAME.
    Regards,
    Himanshu

  • How can I return multiple values with PL/SQL Web Services

    Hi,
    I'm new to developping Web Services. I'm doing some tests with JDeveloper and OC4J on my local machine with a Web Services based on a PL/SQL function within a package. Right now that function only returns one value. So the xml response only has one output.
    I'd like to know how can I return multiple values with my PL/SQL Web Service. For example, if I want to return an employee's name and id? And that the xml contains two output : <employee>, <empid>?
    Reginald
    ps : I have searched the forum and I couldn't find an answer to this question, if that has been discussed AND answered before, can you please post the link? Thanks

    Alright, I actually found my answer. Since this was asked I think as a followup somewhere else I'll give my answer.
    It is very simple, all you have to do is create an Object Type and then Return that object type. After that, JDeveloper will take care of everything and you will have an xml response with multiple values. Here
    {color:#ff0000}
    create or replace TYPE person AS OBJECT
    ( id_interv number,
    first_name VARCHAR2(50),
    last_name VARCHAR2(50),
    date_birth date
    );{color}
    Then your function used in your Web Service should look something like this :
    {color:#ff0000}
    function info_emp (p_empno IN VARCHAR2) RETURN person AS
    l_emp person := person(-1,'','','');
    BEGIN
    SELECT first_name
    ,last_name
    ,emp_no
    INTO l_emp.first_name
    ,l_emp.last_name
    ,l_emp.emp_no
    FROM emp
    WHERE upper(emp_no) = upper (emp_no);
    {color}
    {color:#ff0000}
    RETURN l_emp;
    EXCEPTION WHEN NO_DATA_FOUND THEN
    l_emp := person (-1,'n/a','n/a','n/a');
    RETURN l_emp ;
    END info_emp;{color}
    {color:#ff0000}{color:#000000}After that, this is what the xml response looks like :{color}{color}
    &lt;first_name xsi:type="xsd:string"&gt;John&lt;/first_name&gt;
    &lt;last_name xsi:type="xsd:string"&gt;Doe&lt;/last_name&gt;
    &lt;emp_no xsi:type="xsd:string"&gt;0250193&lt;/emp_no&gt;

  • How can we read some bytes from every line of the file

    How can we read some bytes from the every line of the file moving on to the next line
    without using the read line

    Actualiy readLine() takes more execution time
    for reading a part of line if we can do so without
    readLine() we can save some time...Well, if you knew, beforehand, the length of each line, you could use RandomAccessFile and its seek method, but, since you don't, you would have to read the rest of the line character-by-character, checking to see if it is a newline, in order to place the "cursor" at the beginning of the next line in order to read the next few characters you want.
    So, as you can see, you will need to read the entire line anyway (and if you do it yourself you also have to do the checking yourself considering all three possible end-of-line sequences), so you just as well use readLine().
    Some people may suggest Scanner and it's nextLine() method, but that also needs to read the rest of line (as evidenced by the fact that it returns it), so that is no different than the readLine() (or read it yourself) solution.

  • How can i get all values from jtable with out selecting?

    i have one input table and two output tables (name it as output1, output2). Selected rows from input table are displayed in output1 table. The data in output1 table is temporary(means the dat wont store in database just for display purpose).
    Actually what i want is how can i get all values from output1 table to output2 table with out selecting the data in output1 table?
    thanks in advance.
    raja

    You could set the table's data model to be the same:
    output2.setModel( output1.getModel() );

  • How do I return two values from a stored procedure into an "Execute SQL Task" within SQL Server 2008 R2

    Hi,
    How do I return two values from a
    stored procedure into an "Execute SQL Task" please? Each of these two values need to be populated into an SSIS variable for later processing, e.g. StartDate and EndDate.
    Thinking about stored procedure output parameters for example. Is there anything special I need to bear in mind to ensure that the SSIS variables are populated with the updated stored procedure output parameter values?
    Something like ?
    CREATE PROCEDURE [etl].[ConvertPeriodToStartAndEndDate]
    @intPeriod INT,
    @strPeriod_Length NVARCHAR(1),
    @dtStart NVARCHAR(8) OUTPUT,
    @dtEnd NVARCHAR(8) OUTPUT
    AS
    then within the SSIS component; -
    Kind Regards,
    Kieran. 
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Below execute statement should work along the parameter mapping which you have provided. Also try specifying the parameter size property as default.
    Exec [etl].[ConvertPeriodToStartAndEndDate] ?,?,? output, ? output
    Add a script task to check ssis variables values using,
    Msgbox(Dts.Variables("User::strExtractStartDate").Value)
    Do not forget to add the property "readOnlyVariables" as strExtractStartDate variable to check for only one variable.
    Regards, RSingh

  • How can I transfer some photos from PE11 to be saved on my new IPad?

    How can I transfer some photos from PE11 to be saved on my new IPad? I know I can use Adobe Revel but that relies on an Internet connection. The person I wish to show the photos do not have internet connection.

    You can use iTunes on your local computer to transfer photos:
    http://www.howstuffworks.com/tablets/transfer-pictures-to-ipad.htm

  • How can I delete some music from my iCloud but not from my iTunes in my computer? please??

    how can I delete some music from my iCloud but not from my iTunes in my computer? please??

    iCloud doesn't store your music.

  • How can i share some apps from my macbook pro to iMac on different IP?

    how can i share some apps from my macbook pro to iMac on different IP?

    sign into same id on both computers in the app store
    see this
    http://support.apple.com/kb/HT2519
    Peace, Clyde

  • How can i delete some books from ibook?

    How can i delete some books from ibook? It says: this book can't be opened. The book is corrupt. I can't open and I can't delete it

    I was unable to delete a book sample from my iPhone 5s running iOS 7.  This seems to be what worked for me.  I went to the Library and clicked "edit" in upper right side of the screen.  I then tapped one time on the book I wanted to remove and a blue check appeared at the bottom right corner of that book (presumably you could tap several at a time)  Anyway, when the blue check is on the book, you will see in the upper left of the screen the word "Delete" (mine was in red) I clicked that and then a confirming dialog came up from the bottom of the screen with the choices of "delete" or "cancel".  I chose "delete" and the book was gone.  Hope this helps.

  • How can I transfer some songs from my ipod to my itunes library although they are not purchased from itunes store?

    How can I transfer some songs from my ipod to my itunes library although they are not purchased from itunes store?

    By using one of third-party programs discussed in this previous discussion:
    Best iPod to PC

  • How can I save some pics from my Mac onto my Ipod touch?

    How can I save some pics from my Mac to my Ipod Touch ?

    Syncing photos with iTunes is explained here: http://support.apple.com/kb/HT4236
    You'll have to choose the photos you want to sync in the photo pane in iTunes with your phone connected, then apply sync.

  • How can I remove some themes from Keynote??

    How can I remove some themes from Keynote??

    What a co-incidence... I just deleted those same goodies. They were in /Library/Application Support/Keynote-folder on my machine. I just deleted the whole folder, cause there seemed to be nothing more but those downloaded files. And Keynote worked great afterwards. There seemed to be another folder for iWork09, which is not to be removed.

  • How can I get one value from local machine registry

    how can I get one value from local machine registry, I would like read one value of regitry. I have windows NT workstation. I need it to find the full path of iexplore.exe, this value is in 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE'
    Thanks.

    You can use the D2KWUTIL.pll library to read/write to the registry. You have to install the forms examples to get the library.
    The library d2kwut32.dll must also be installed at the clients.

  • How do I return a value from a column based on info from neighboring columns?

    I have a table of data that looks similar to this:
    Weight
    Name
    School
    Division
    106
    Name1
    School1
    1
    106
    Name2
    School2
    2
    106
    Name3
    School3
    3
    106
    Name4
    School4
    4
    113
    Name5
    School5
    1
    113
    Name6
    School6
    2
    113
    Name7
    School1
    3
    113
    Name8
    School3
    4
    It's a very large table, so there will be multiple matches for Schools, and occasionally a few matches for Names, but there will always be only one match for a given Weight and Division.
    In a separate table, how can I get the name of the person associated with the unique weight and division?
    In my head, the formula goes" "Look in the Weight column to find 106, then look in the Division column to find 4, then return the value from the Name column." But I can't figure out the formula that will do that.
    Any thoughts?

    Hi momogabi,
    This can be easily done with an index column.
    The formula I used in your original table for the index column is:
    =A2&"-"&D2. This was filled down. The column can be hidden.
    You can see the formula in the search table. If I wanted to eliminate the index column in that table the formula would look something like:
    =INDEX('Table 1-1'::B,MATCH(A2&"-"&B2,'Table 1-1'::E,0),1)
    Hope this helps.
    quinn

Maybe you are looking for

  • I'm unable to send out mail on my macbook.  I can send on iPhone but not on my macbook pro

    I get a message that says: "cannot send message using the server AOL".  This happens not only with my AOL server but also with my iCloud and gmail servers as well.  I have checked to make sure the password is correct. 

  • Form2xml generate xml files with "??????????" for non-latin characters

    i used form2xml in oracle 10 g suit to convert forms 5   .fmb to .xml . using the command: frmf2xml.bat OVERWRITE=YES myform.fmb The forms contains arabic character set, but the xml file is generated with character "????????? "  , and the xml file is

  • Ipod does not hold charge

    My iPod Classic only holds a charge for 10 minutes. Can this be repaired?

  • Valuation class lost

    Hi. We are using purchases orders without material number, so account determination should be done via Material Group. However, when trying to post Goods Receipt thru MIGO, I obtain the message: "Account determination for entry PCS WRX GLOB not possi

  • Adjusting Date/Time Corrupts Masters

    I have an issue with Aperture 3.1.1. I would appreciate any comments or thoughts. I have scanned some slides, and imported them into Aperture. During the import I renamed them (masters also) to include the file date (20110111_001 etc.) I stored the m