Triggering Java Script in WebDynPro

Hi Experts,
I wanted to know if there is any way to trigger java Scripts in webDynpro application.
If yes, please provide any document on the same.
Thanks in advance.
Regards,
Rohan

Hi Rohan,
Javascript is not part of the Web Dynpro programming model.
Remember: Web Dynpro is a multi-client programming model that supports not-only Web browsers.
Meanwhile, have a look at the following thread for more info.
Re: Java Script in WebDynPro!!!!
I hope this helps.
Regards,
Gopal.

Similar Messages

  • To use Java Script in WebDynpro

    Hi,
    i am trying to do a webdynpro application where in, if i click on the button it should trigger the java script.how could i do that

    Kalyan,
    try to follow these tutorials:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial on enabling message and error support - 3.htm
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/tutorial on using validating and non-validating actions - 33.htm
    you can achieve validating with Web Dynpro methods but not with JavaScript inside of WD-applications.
    kr, achim

  • Java Script in WebDynpro ABAP

    Hi Everybody,
    i´ll hope that someone can help me. It is possible to take Java Script in a WebDynro for ABAP. Can anybody give me some code samples or something to solve the issue?
    Thanks
    Best regards
    Markus

    Web Dynpro ABAP is not intended for adding Java Script, or any script for that matter.

  • Java Script in WebDynPro

    Hi,
    I just want to know if we can use JavaScript in WebDynPro.
    If its possible I would like to know how we can implement Alert Messages,Warning Messages,Error Messages using JavaScript.
    If a piece of sample code is shown it would be of great help.
    Please let me know in this regard.
    Thanks and regards,
    Chandrashekar.
    Edited by: Armin Reichert on Jan 30, 2008 6:58 AM

    Hi Chandra,
    Custom Javascript is not possible in Web Dynpro.
    You need to handle the validations and can use MessagePool to generate the messages.
    You can also write a custom Java class to handle validations.
    Regards
    Nikhil

  • Java Script with WebDynpro

    hi,
    pls see subject. Is it possible ?
    reagards
    sas

    Hi sas,
                Check this
    <a href="/people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro:///people/valery.silaev/blog/2005/09/14/a-bit-of-impractical-scripting-for-web-dynpro
    regards
    Sumit

  • Java Script erros in webdynpros...

    Hi,
      I'm facing problems with webdynpro apps. No server events are working. I'm using IE as the browser. On running the application, I get the initial screen, but there on nothing works. IE reports java script errors like.. "Error: SSR is undefined. Code 0." I think it might have something to with WAS configurations, because we have been fiddling with some recently:(. Another thing that I noticed is that recently the theme/look of the webdynpro apps keeps alternating between 2 styles(seemingly at random!). Any help would be greatly appreciated.
    Regards,
    Harsh
    PS:This problem applies to previously working dynpro apps.

    Hi Harsh,
    There is a folder called SSR in the server where u store the themes .I wonder if there is any relation between those two.
    Are u using a custom made theme. If so remove the entry from the visual admin.Restart the server and your PC once. There might be a prblem that it is taking details from the cache.(Even if u have not touched any settings try restarting the system... )
    And one more point ,as the problem is in the server using a diiferent client system is immaterial.
    Regards
    Bharathwaj
    Message was edited by: Bharathwaj R

  • Include Java script in the abap webdynpro

    Dear expert,
    Anyone know how can i include a java script in the abap web dynpro.
    Thanks
    Regards,
    Bryan

    Hi
    There is no way you can include Java Script in Web Dynpro ABAP. You can navigate to a BSP application and run your JavaScript.
    Abhi

  • How to Debug Java Script in Adobe Form

    I have used an alert for empty fields . I have used Check button control for this.
    But the button click is very inconsistent. Some times it triggers the event sometimes it doesnt. Is there anyway to debug the java script. I have installed Script editor for IE but I am unable to use it for Adobe Forms.
    Any help is appreciated.
    Thanks,
    Vasu

    Hi Vasu,
    i think that maybe is the check sequence is not very correct.. and maybe you can try to code it one check for empty fields at a time..
    example
    Name.
    Address.
    Tel.
    Hp.
    Email.
    so u can try to code for one item at a time then slow try to debug it... as last time i use to insert the javascript inside each component then after it i implement into a button and slowly check for the check sequence which one need to be 1st and etc.
    hope it help you. if not maybe u can give more information. maybe i can help you out at myside.
    Regard,
    Ng Jia Jun

  • Java Script: Form Submit issue.

    Is there a way where I can submit two forms ?
    Thats is submit 2nd form only when the first form is submitted.
    I tried this it works.
    function formSubmit(){
    document.form1.submit(); //Submit First Form
    alert(); //This will stall the execution thus form2 will not be submitted till I click on OK
    document.form2.submit();
    }But If I dont put an alert in between, only the second form is submitted.
    If I put a delay of say 3 seconds in between then it will throw a SOCKET CLOSED error in the action event triggered due to first form submit.
    Well Basically when the Alert pop's up the parent page "STALLS" and thus the form2 does not submit till I click on OK, Is there a way I can stall the browser/Parent JSP page using JAVA SCRIPT ??

    Relax people... Ok I will move my querries else where :) ..
    But whats wrong if somebody can provide me an answer ? I am sure most of you know java script , if you dont know then don't answer simple as that.
    You do know that Sun did not create JavaScript, right? So the Sun forum sites may not be the best place to look for a JavaScript forum " {code} 
    You mean to say if something is not from sun I am not supposed to ask a question on that, I agree that this is JAVA Programming forum.
    Peace,.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Button executing CloseWindow Java Script and raising event on server

    Hi All.
    Somebody can help me with this:
    <b>What i'm needing:</b> an 'END' button on a BSP, when the user click on this button just show an aswer box asking if the user wants to close the windows, in case to click yes close the current window and execute a business logic in the controller.
    <b>What i have:</b> a button with the event onClientClick invoking a Java Script function which is showing the answer box and the event onClick which raise the event on the server side. The thing is if the user click on yes then i'm closing the current window and the server event never is triggered. This is not working !!!
    Any ideas ? some sample code ?
    Thanks in advance.
    Armando.

    Hi Armando,
    The 'Yes' on the <i>Confirm dialog box</i> (Client Side Scripting) has to tell the application (Server side scripting) to call your METHOD XXX. This is done by passing querystring <i>exit=X</i> to the URL.
    1. Comment onClick event of the button.
    2. Modify the code the JS function of your End button as follows
       func_end()
    //if no
      // your original code
    // if yes
    document.location.href = document.location.href + '?exit=X';
    3. Add following code to DO_REQUEST
      IF REQUEST->GET_FORM_FIELD( NAME = 'exit' )  ne space.
    *your method will be called only when there is an exit=x in the url
           call method XXX.
    *set a page attrib as follows
           l_exit = 'X'.
      ENDIF.
    4. Add following code to your layout
    <%if l_exit = 'X'.%>
    <script>
    window.close();
    </script>
    <%endif.%>      
    Regards,
    Alwyn

  • How to write Java script for refering the 1st page text field from 2nd page?

    Hello I am developing an VISITOR info interactive form with webdynpro ABAP, its with 2 pages. Their heirarchy is,
    VISITOR_form
        |
        |
        |------Page_1
        |            |
        |            |
        |            |------Text_Field_A_1
        |            |
        |            |------Text_Field_A_2
        |
        |------Page_2
                     |
                     |
                     |------Text_Field_B_1
                     |
                     |------Text_Field_B_2
    Now, i have selected the 'Text_Field_B_1' of page_2 and writing the Java script, my requirement is; If Page_1's 'Text_Field_A_2' has a value of "Value_ABCD", THEN the 'Text_Field_B_1' of page_2 should be 'readOnly'. Pls let me know Wht is the Java script for this requirement?

    if (xfa.event.newText=="ABCD")
    VISITOR_form.Page_2.Text_FieldB_1.access ="readOnly";
    place script on change event of Text_FieldA_2

  • Opening OA page in new java script window from ProcessRequest method

    I wish to open new OA page in new java script window.
    Code is
    javascript:var help_win = window.open(strHelpDesk,'help_win',
    'resizable=yes,scrollbars=yes,toolbar=yes,width=600,height=500'); help_win.focus();
    strHelpDesk is the url of the requested new OA page .. How can we open that page in new window from processRequest .. I can't assign this code in pages's attribute ... The new Oa page should be opened whenever , control goes in Processrequest ... Do we have such command ? can we use pagecontext.redirectImmediately..or any other command ..
    thx in advance

    Yes, you can, what you need to do is
    add a raw text bean in your page.
    Attach this raw text bean to a transient attribute (column) of VO
    populate this column with your javascript function which will open a new window and inlcude its call here
    now whenyour page will render and process request is called ur javascript function is triggered and a new window will be opened.I guess i am clear!
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to execute unix shell script in webdynpro?

    hi all,
      We have some iquirement of executing script in unix.If anyone know How to execute unix shell script in webdynpro?
    best regard
    reefish

    Ree,
    1. Find SSH client for windows, then execute SSH with Runtime.exec() on local host with arguments like remote host, auth, command to execute etc.
    2. Get SSH client in Java and execute SSH commands on remote host using pure Java API.
    Don't ask me for links, Google works today, I checked this
    Valery Silaev
    SaM Solutions
    http://www.sam-solutions.net

  • Urgent !!! - Java script help for events in adobe form

    Hi ,
    We have requirement  where we have 5 buttons on interactive form which will retrive data from R/3 system .
    1) How can i distingish the event of each button  ?
    For Ex : We have 5 buttons namely , GetPlantcode , GetStatus, SubmittpSAP etc..
    We hav only 2 events on adobe form - Submit to SAP and SAPCheckFields.
    Please let me know some alternative by which i can sent some variable to webDynpro which distinguishes them.
    2) How to set a value for the context variable on button click event ?
    Ex : I have a context node ( data node ) bind to adobe interactive adobe component on a webDynpro application. If i want to set Selectindicator ( value attribute in data Node ) a value on a button click , Please let me know the java script how i can do this.
    Happy New Year for all
    Nanda

    Hi ,
    We found one work around for this. It seems to solve our issue for now.
    Set a text field on adobe and try to set it with some value in each button click. We can get retrived that value in webdypro application through context bind value node to text field.
    Using the value in the value node we have applied different logic in same event submit to SAP.
    Nanda

  • How to load a java script in oracle database

    Is it possible to load d java script in Oracle database. while the object type is
    java resource ..

    RENUJP wrote:
    I meant to load a javascript to oracle database not to oracle appliocation.
    like loadjava....
    I can load a javascript to oracle database.. but i can't call it...Please re-read the comments above, especially the part about this not being a javascript nor oracle forum. Exactly what part about this information don't you understand?

Maybe you are looking for