How to embed JavaScript in a DynPro View?

Hello,
I hava a standard DynPro application.
I would like to add a link UI which by pressing it will activate a JavaScript function. Can someone please show me how to do it and ingeneral how to embed JavaScpript in a DynPro View?

This (protocol javascript:) probably works in current releases but in future releases it will be disabled by default for security reasons.
The set of allowed URL protocols will then be configurable in the J2EE server.
Armin
Message was edited by: Armin Reichert

Similar Messages

  • Embed website in Web Dynpro View

    Hi all,
    I am trying to embed a website in a Web Dynpro View. I am not sure about it how to get this.
    I have created a ViewContainerUIElement on the view and the website should be placed in this element.
    My code for creating the website looks like following:
    DATA:  lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA:  lo_api_component  TYPE REF TO if_wd_component.
      DATA:  lo_window         TYPE REF TO if_wd_window.
      DATA:  ld_url TYPE string.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      ld_url = 'http://www.google.de'.
      CALL METHOD lo_window_manager->create_external_window
        EXPORTING
          url    = ld_url
        RECEIVING
          window = lo_window.
      lo_window->open( ).
    But how can I integrated the website in my ViewContainerUIElement or isn't it possible?
    Thanks for you help
    Peter

    Hi,
    You can try using UI element Iframe.
    URL can be mentioned in source property of Iframe as http://www.google.com.
    Re: How to Add URL in a view .
    Regards
    Manas Dua

  • How to embed PDF document to a view in WDJ?

    Hi, experts,
    I have a PDF document for helping user to use a software product. I want to embed it to a view through interactiveform in web dynpro for java so that other users may read the PDF document. I don't how to implement it?
    Do you give me some hint?
    Best regards,
    tao

    Hi,
    One quick question, where have you stored the PDF? is it in MIMEs folder ?
    You have 1 of these 2 options to choose:
    1. Get the PDF data in Byte format, fetch the absolute URL and display it in an iFrame UI Element.
    2. Set the property of Adobe Interactive form UI elemets property -
        mode = usePDF Mode (This mode value does not change the original PDF document. The data source and the template for the creation of the PDF document are ignored)
        pdfSource = Path to the context element containing the PDF document.
    -Kunal Kotak

  • How to embed html page in bsp view

    Dear all,
    I would like to embed a html page (eg: www.google.com)  inside bsp view. I have used iframe to do this; but the iframe is getting refreshed everytime a button is getting clicked. Delta handling flag is also not working for iframe. Is there any other method to embed html in bsp view.
    Thanks and Regards,
    Manasi

    Hi Shreya,
    See if this <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/_s-u/SDN%20Behind%20The%20Scenes%20-%20Embedding%20an%20EP%205.0%20iView%20in%20an%20HTML%20Web%20Page">link</a> helps.
                            OR
    You can create a JSP dynpage in portal application object.
    Along with this JSP and dynpage is created automatically. You can copy the html page and paste it in JSP page. To make it display, include a statement in JSP dynpage as
    this.setJspName("JSPname.jsp");
    For more info on this u can refer:
    http://help.sap.com/saphelp_nw04s/helpdata/en/95/cfa441cd47a209e10000000a155106/frameset.htm
    To get an idea of content development you can refer this <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2845">weblog</a>.
    Regards,
    Pooja.
    Message was edited by: Pooja S

  • Web Dynpro Views As Callable Objects in GP

    I would like to know how to setup a sequence web dynpro views off a common WD component as a callable object.  In particular, my GP will use View1, View2, .. View n all based on a common web dynpro DC and same single WD component.  How  should this be configured in GP that each View refers to the same WD instance?  Where is state stored in such a scenario?  Does the GP framework instantiated the WD component and maintain it for the entire lifecycle of the process?  Thanks.

    hi
    check out this link. Refer page 14
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/0c7b2f25-0c01-0010-f2a2-f8a65a9dcad9">Defining Several iViews based on one Web Dynpro application</a>
    Other link that can be helpful is
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3f07a7a-0601-0010-ebbd-b9cfb445b814
    Thanks & Regards
    Harsimran

  • How to embed views dynamically in a view container ?

    Hi ,
        Can you please guide me how to embed a view dynamically in a view container ?
    Thanks & Regards
    Gaurav Jain

    Hello,
    Please read this [/people/rajagopal.vemuri/blog/2006/09/19/web-dynpro-for-abap-creating-dynamic-ui-elements-and-context-step-by-step].
    Regards.

  • How to show a pcd object in dynpro view

    Hi All,
    I have to show a PCD object in dynpro view but I can't use iFrame because it will show all header footer of portal not just view.
    what will be other way to show a PCD object in Webdynpro view.
    Thanks

    Hi John,
    Yes I want to display a iView only but of other type, will you please guide me how you have achieved it?
    Thanks

  • How to embed Flash without Javascript?

    How to embed Flash without Javascript? Other way to ask this: if user desactivates Javascript, sill Flash content still be visible?
    Thanks for helping.

    Hi
    This article may be of interest (shows with and without javascript methods), - http://perishablepress.com/press/2007/04/17/embed-flash-or-die-trying/.
    PZ

  • How to embed an Ixos tif into a web dynpro

    Does anybody know how to embed a tif image into an iFrame or maybe a image UI element....not sure what the best approach for doing this is.
    We have a url available to Ixos server which launches the tif image: Example:
    http://server.company.com:8080/archive?get&pVersion=0045&contRep=D1&docId=aaaaokjdx1cen255paaaab4dceiau
    How would we have this tif image already embedded in an iFrame when the application launches?  We don't want it to launch a new window.

    An Image UI element will not work because TIF is not an image format supported natively by browsers. In IFrame should work, just set the "src" property to the URL.
    Armin

  • Ajax/Javascript in Web dynpro ABAP

    Hi,
    I need your help in figuring out what artefacts of web dynpro ABAP could help me resolve a problem.
    In a Web dynpro abap application, we have a button that redirects a user to an external site. Some of our users can go to this site from their computer and some others can't because they are not allowed. I would like to be able to show the button only to the users that have the right to execute this navigation.
    In order to do that, I need to embed some script in my web dynpro application that will test if the URL of this application sends back an HTTP/200.
    With the latest versions of Web Dynpro ABAP, is it possible to embed javascript of ajax? How can it be done?
    If not, what could I use to base the visibility of my button on a validation that has to run on the users's browser?
    Thank you very much for your help!
    Renaud

    Another way it could be done creating a custom ztransaction (abap report) performing a PING to the ip server , reading log txt,  saving if the user is authorized or not , and redirecting to the Abap Web Dynpro.
    Then On wddoinit select zztable for authorization.
    But i don't know if this solution will work for you (ping specific port 80? or other requirements)
    DATA: workdir TYPE string,
          path_log TYPE string,
          parameter TYPE string.
    TYPES: BEGIN OF tylog,
         line(1000),
      END OF tylog.
    DATA: t_log TYPE TABLE OF tylog,
          v_log LIKE LINE OF t_log.
      DATA:  appl_name TYPE string,
                abs_url TYPE string.
    START-OF-SELECTION.
      CALL METHOD cl_gui_frontend_services=>get_sapgui_workdir
        CHANGING
          sapworkdir = workdir.
      CONCATENATE '/C ping google.it >' workdir
      INTO parameter SEPARATED BY space. "example google
      CONCATENATE parameter '\pinglog.txt' INTO parameter.
      CALL METHOD cl_gui_frontend_services=>execute
         EXPORTING
    *    document               =
           application            = 'CMD'
           parameter              = parameter
           synchronous            = 'X'.
      CONCATENATE workdir  '\pinglog.txt' INTO path_log.
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename                      = path_log
          filetype                      = 'ASC'
        TABLES
          data_tab                      = t_log.
      LOOP AT t_log INTO v_log WHERE LINE CS 'Lost = 0'.
        EXIT.
      ENDLOOP.
    if sy-subrc = 0. "ping ok
    zzping-uname = sy-uname.
       zzping-authorized = 'X'.
    else.
      zzping-uname = sy-uname.
      zzping-authorized = ' '.
      endif.
       INSERT ZZPING.
    **construct web dynpro url and call browser
      cl_wd_utilities=>construct_wd_url( EXPORTING application_name = appl_name
                                                                 IMPORTING out_absolute_url = abs_url ).
    CALL FUNCTION 'CALL_BROWSER'
      EXPORTING
        URL                          = abs_url.
    Edited by: alessandro spadoni on Mar 24, 2011 10:09 PM
    Edited by: alessandro spadoni on Mar 24, 2011 10:31 PM

  • How to embed Flash .flv video?

    Hello guys,
    I am wondering, is there any way how to embed Flash video onto my web page?
    And regarding QT video template on iWeb's Movie page, can I drag any kind of QT ? Like H.264 QT for example, or is it just for Mpeg2 QT?
    Thank you so much for any advise.

    What is your video codec you are working with? NTSC (and PAL) DV is about 13 gigs/hr uncompressed. When you export your QT movie from your editing application and convert the file to flv you are compressing the video at that time with a determined bit rate and video dimension. quality and file size comes down to math. File size = bit rate x movie length. Quality is bit rate in relation to dimension. Surprisingly enough the recommended video encoder for flv is Flash Video Encoder application that comes with Flash. Sorenson Squeeze is arguably the best flv video encoder. Visual Hub is not recommended if quality and efficiency is desired. Flash Player is a browser plug-in that that allows web visitors to view Flash videos on your website from their web browse. Most already have Flash player installed and you can insert a script that checks to see if the visitor has Flash player installed and if it doesn't a window will appear informing the visitor that they are required to instal the Flash Player in order to view Flash content on your website. A URL is also provided to direct the visitor to the Flash Player download page. Insert this script into the <head></head> of your site:
    <script type="text/javascript">
    function MM_CheckFlashVersion(reqVerStr,msg){
    with(navigator){
    var isIE = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){
    var flashVer = -1;
    if (plugins && plugins.length > 0){
    var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
    desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
    if (desc == "") flashVer = -1;
    else{
    var descArr = desc.split(" ");
    var tempArrMajor = descArr[2].split(".");
    var verMajor = tempArrMajor[0];
    var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
    var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
    flashVer = parseFloat(verMajor + "." + verMinor);
    // WebTV has Flash Player 4 or lower -- too low for video
    else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;
    var verArr = reqVerStr.split(",");
    var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
    if (flashVer < reqVer){
    if (confirm(msg))
    window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1ProdVersion=ShockwaveFlash";
    </script>
    Then replace <body> with this:
    <body onload="MM_CheckFlashVersion('9,0,0,0','Content on this site requires the latest version of Adobe Flash Player. Do you want to download it now?');">
    Beginning with Flash Player 9 h.264 QT movies are now supported for playback. Simply change the file extension from .m4v to .flv to convert the h.264 video to Flash video that can be viewed from Flash Player 9+ on a web browser.
    hope that helps!

  • How to embed mixcloud in dreamweaver

    Hi,
    I've tried to embed mixcloud in dreamweaver without result. Soundcloud does the job well but with mixcloud there is a problem.
    The problem is related with the Live Viewer and having the right plug-ins.
    Who knows the answer?
    Regards, Remmie

    It works! I don't know exactly what i did but it works.
    www.kasperski-music.com/test.htm
    And it still doesn't work in preview, so i assumed it also wouldn't work on
    the air.
    Thanks for your help!
    Casper
    2013/4/25 Jon Fritz II <[email protected]>
       Re: How to embed mixcloud in dreamweaver  created by Jon Fritz II<http://forums.adobe.com/people/JonFritzII>in
    Dreamweaver - View the full discussion<http://forums.adobe.com/message/5268111#5268111

  • How to embed images in long text of PM Notifications/Orders

    Dear Sir,
    How to embed images in long text of PM Notifications/Orders? Kindly help.
    Thanks & Regards
    PM Team.

    Hi,
      Unfortunately, You will not be able to view the graphics within the Long text editor screen.Only Limited word functionality is available on these editors.
      You will have to store these pictures separately as an attachment, through generic object services and then view them through that.
    Regards
    Narasimhan

  • How to use Javascript in OBIEE?

    Hi all,
    can any one tell how to use javascript in OBIEE. i.e steps to follow to insert the javascript in OBIEE 11g or 10g

    If you are trying to display total number of pages in a report, Add the below formula in the column of the report and hide that column in the report.
    FX = sum(count(1))/25
    You can then reference the column in the narrative view like this: "Total pages in the report are @5" and out put may be "Total Pages in the report are 30".
    Or
    You can also use something like the below:
    To calculate them use fi:
    CEILING(CAST(RCOUNT("FactColumn In the Report (Sum All)") as DOUBLE)/ 25) for the page number
    CEILING(CAST(COUNT("FactColumn In the Report (Sum All)") as DOUBLE)/ 25) for the total pages
    Put the above formula in the column and reference it in the narrative view like I mentioned in the previous example.
    If you are report view is pivot, then please refer to this link: http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/
    Hope this helps.
    Thanks,
    -Amith.

  • Calling an ABAP report from a web-dynpro view

    Hi,
    I have a web dynpro view that i would like to call an ABAP program from.  Any ideas how i can do this?  Thanks,
    Samir
    Edited by: Samir Vora on Feb 18, 2008 11:12 AM

    Hello Samir,
    that would mean mixing two different ui technologies and hence it not possible. You can start the report in background though. Please refer to [this list of restrictions and limitations|http://help.sap.com/saphelp_nw70/helpdata/en/46/82091e304559dbe10000000a1553f6/content.htm] regarding the usage of certain ABAP statements.
    Best regards,
    Thomas

Maybe you are looking for