Skip to Content
author's profile photo Former Member
Former Member

Picture "loading_ani.gif" for loading a page

In the sap example page htmlb_samples/default.htm and then the chart example. When the user is waiting for the page, a loading_ani.gif is shown in the background of the page. How can I use this option?



Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2004 at 01:24 PM

    I actually just added that graphic into a new BSP application not more than 30 seconds before I read this.

    I use it with the the session.htm page after setting up the whole SSO for my application.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Here is the code for the session.htm I use and I set session.htm as the inital page for my BSP Application.

      <%@page language="abap" %>
      <%@extension name="htmlb" prefix="htmlb" %>
      <% " Copy this page into your BSP application, and change line below.
         " This page should always used be as entry point into application.
         DATA: target_page               TYPE STRING VALUE 'index.htm'.
         DATA: do_not_delete_sso2_cookie TYPE XFELD  VALUE SPACE.
         " Comment: In ie, when the browser is closed, the new popup window is
         " still executed, before complete shutdown. This allows us to still close
         " the session in the backend. With NN, when the browser is closed, it
         " is gone for ever. So no session cleanup. This is feature/bug of one
         " browser or the other browser.
      <script language="JavaScript">
         DATA: guid TYPE GUID_32.
         CALL FUNCTION 'GUID_CREATE' IMPORTING ev_guid_32 = guid.
      var frame_A = "<%=guid %>_A";
      var frame_B = "<%=guid %>_B";
      function Loader(name)
          doc.writeln('<html><body onLoad="JavaScript:document.f.submit();">');
          doc.writeln('<form id="f" name="f" target="<%=guid %>_A" method="POST" action="<%=target_page %>">');
          <%  DATA: ffs TYPE tihttpnvp, ff  TYPE  ihttpnvp.
              request->get_form_fields( changing fields = ffs ).
              DELETE ffs WHERE name cs '~'.
              LOOP AT ffs INTO ff.
                doc.writeln('<input type="hidden" name="<%=ff-name %>" value="<%=ff-value %>">');
          <%ENDLOOP. %>
          <%@ include file = "loading.js" %>
          <%=runtime->GET_DOMAIN_RELAX_SCRIPT( )  %>}
      function exitBSPApplication(newTargetUrl)
      {<% if runtime->session_manager->is_running = 0.  %>
        <%CLASS cl_bsp_login_application DEFINITION LOAD. %>
        var url  = "<%=CL_BSP_LOGIN_APPLICATION=>GET_SESSIONEXIT_URL( page = page ) %>";
        <%IF do_not_delete_sso2_cookie IS NOT INITIAL. %>
            url += "&bsp_do_not_delete_sso2_cookie=X";
        <%ENDIF. %>
        var prop = 'height=100,width=400,top='+(screen.height-100)/2+',left='+(screen.width-400)/2;
        var out =,'_blank',prop);
       <%endif. %>
        document.getElementById("<%=guid %>_FRAMESET").onunload = null;
        if(newTargetUrl) window.setTimeout('{document.location.href="'+newTargetUrl+'";}', 750);
      function frameLoaded(name)
      <frameset id="<%=guid %>_FRAMESET" rows="*,0" onUnLoad="exitBSPApplication();" resize="no" framespacing="0" frameborder="0">
          <frame name="<%=guid %>_A" src="JavaScript:parent.Loader('<%=guid %>_A');" onload="frameLoaded('<%=guid %>_A');" >
          <noframes>This browser does not support frames.</noframes>

      I modified the above to inlcude a js file

      doc.writeln('<table border="0" width="100%" height="100%">');
      doc.writeln('<td align="CENTER" valign="MIDDLE">');
      doc.writeln('<img src="ani/loading.gif" border="0"> ');
      doc.writeln('<br> ');
      doc.writeln('<span style="font-family:Arial,sans-serif;"><otr>Loading...</otr></span> ');

      If you read through the weblogs of Brian McKellar you will see more information on this process.

      The protectDoubleSubmit is an excellent element to use however it takes place when the page does it's Event Handling to prevent the user from clicking submit more than once. But for the inital loading you will need something like what I put above.

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2004 at 03:04 PM

    Jens, I dont know what you want to do... If you want to do the same that in SAP samples use this long code...

    <xhtmlb:protectDoubleSubmit timer="1"/>




    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 01, 2004 at 08:09 AM

    Here is how I extended the protectDoubleSubmit element to show this loading_ani.gif:


    tmp_string = ``.

    pds_title = `Bitte warten...`.

    pds_text = `<div style='background-color:#ffffff; padding-top:11px'><img id='PDS_image' src=common/loading/loading_ani.gif' height='32' width='32' align='absmiddle'> Ihre Anfrage wird bearbeitet</div>`.


      replace="<%= tmp_string %>">
      timer = "0"
      title = "<%= pds_title %>"
      text  = "<%= pds_text %>" />

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      I am trying to upload a picture from the SAP BSP I am using the code that you have posted.But its giving like LIterals more than one line not permitted.

      What should I do .

      Could you please help me out.

      With Cheers


Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.