cancel
Showing results for 
Search instead for 
Did you mean: 

setting the mouse pointer

Former Member
0 Kudos

Hi all,

is it possible to set the mouse pointer from pointer to hour glass and back while a web site is loading in the html viewer? If yes, how? Which method is to use? Which attribute needs to be set?

regards

Siggi

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Raja,

it is displaying the text, nothing else happens.

regards

Siggi

athavanraja
Active Contributor
0 Kudos

Looks like there is a problem with the html code in your template.

just copy paste the code below into notepad and save the file with .html extension into the local drive. Then open the saved file using Internet Exploere and tell me what happens.

<b>start of code</b>


<html>
 
<head>
<title>New Page 1</title>
<script language="javascript">
function loadurl(url){
window.open(url , "_self")
 }
</script>
</head>
 
 
<body onload="javascript:loadurl('http://www.yahoo.com')">
Loading . . . . . 
</body>
 
</html>

<b>end of code</b>

Regards

Raja

Former Member
0 Kudos

Hi Raja,

the internet explorer is displaying the content of the file. Nothing else happens. We are using IE 5.5

regards

Siggi

athavanraja
Active Contributor
0 Kudos

> Hi Raja,

>

> the internet explorer is displaying the content of

> the file. Nothing else happens. We are using IE 5.5

<b>by content of the file do you mean 'Loading....' and nothing else happens?</b>> regards

>

> Siggi

I am using IE6.0. But dont know if thats the problem. Any how try this alternate approach.


<html>
 
<head>

<title>New Page 1</title>

</head>
 
<body> 

Loading . . . . . 

</body>

<script language="javascript">
document.location = 'http://www.yahoo.com'
</script>

</html>

Regards

Raja

Former Member
0 Kudos

Hi,

I tried this alternative also, but all I get in the IE is

<html>

<head>

<title>New Page 1</title>

</head>

<body>

Loading . . . . .

</body>

<script language="javascript">

document.location = 'http://www.yahoo.com'

</script>

</html>

So IE is displaying the content of the file (the complete coding).

regards

Siggi

athavanraja
Active Contributor
0 Kudos

Did you save the file with .html extension.

Save the file in your desktop with extension .html and double click it.

Regards

Raja

Former Member
0 Kudos

Hi,

that is exactly what I did.

regards

Siggi

athavanraja
Active Contributor
0 Kudos

No way.

If you had just pasted the code below into a notepad and saved it into your desktop as html file and double click it IE will open and you will first see "Loading...." and then www.yahoo.com will load into that page.


<html>

<head>

<title>New Page 1</title>

</head>

<body> 

Loading . . . . . 

</body>

<script language="javascript">
document.location = 'http://www.yahoo.com'
</script>

</html>

something is wrong. Do you have some web programmers in your place. Show him what you are doing. He will be able to help you, in case if you are making some minor mistakes. I can't think of a thing where you can go wrong in this example. its pretty simple and straight forward.

Regards

Raja

athavanraja
Active Contributor
0 Kudos

Hi Siggi,

Did you solve your problem. Do let us know when you do.

Regards

Raja

Former Member
0 Kudos

Hi all,

thanks for your replies. Doing a loop is something I already had in mind, but this also means, that the user has to wait for a defined time until he is able work in his session again. Is there no method or attribute to be called or to be set? I am dealing with cl_gui_html_viewer.

regards

Siggi

athavanraja
Active Contributor
0 Kudos

Hi,

This is not SAP GUI. He is talking about HTML viewer within SAP GUI os no question of SAPGUI_PROGRESS_INDICATOR.

As Eddy mentioned you have to use javascript to achieve this.

Regards

Raja

Former Member
0 Kudos

Hi guys,

ok, but how can I implement this Java-code in an ABAP?

Are there some methods!? to pass this code to?

regards

Siggi

Message was edited by: Siegfried Szameitat

athavanraja
Active Contributor
0 Kudos

The javascript has to be inside the HTML page. But before going there can you answer the following question. It will help us to anyalyze it better.

1. The content inside your HTML viewer - are you loading an external URL or are you building the HTML in your program or using HTML templates?

2. Where do you want the progress bar -> while lodaing the HTML document in the view at the SAP GUI status bar or

within the HTML page itself?

Regards

Raja

Former Member
0 Kudos

Hi Raja,

thanks for your reply, here the ansers to your questions.

1. In R/3 I am getting the URL out of the roles of the current User in BW (Web-Query). So I would say it is a external url.

2. I want the progress bar, if possible, in the html page which is a object of type cl_gui_html_viewer on a dynpro.

Hope this helps you, solving my issue.

regards

Siggi

athavanraja
Active Contributor
0 Kudos

Ok. just copy the code below and put it in a notepad and change the URL and save it as a html document.

***start of code


<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<b><META HTTP-EQUIV=Refresh CONTENT="0; URL=<your BW webquery URL>"></b> <title>New Page 2</title>
</head>
<body>
 <p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
Loading ...... </p>
</body>
</html>

***end of code

Got to transaction SMW0

Choose the radio button "HTML templates for WebRFC application" and hit ENTER and then hit execute from the next screen.

In the next screen

Click on create and give a object name and description.

and import the HTML file you have saved.

Now within your abap program.


call method html_control->load_html_document
       exporting
        document_id  = '<object you have created in SMW0'
       importing
            assigned_url = doc_url
       exceptions
            others       = 1.

  if sy-subrc eq 0.
    call method html_control->show_url
         exporting
              url = doc_url.
  endif.

In this example we have hard coded the URL. If you want to dynamically assing a new URL from your ABAP into this template then you need to use place holders in the HTML template and replace the place holder for URL with appropriate value using FM

WWW_HTML_MERGER

.

Also if you want some nice graphical progress bar you may have to add some nice .gif file along with Loading.... message in the template.

Hope i am clear.

Regards

Raja

Former Member
0 Kudos

Hi Raja,

I followed your instruction and just for testing I changed <your BW ...> to http://sap-ag.de

This is what I get right now in my html viewer object:

<html>

<head>

<meta name="GENERATOR" content="Microsoft FrontPage 5.0">

<meta name="ProgId" content="FrontPage.Editor.Document">

<META HTTP-EQUIV=Refresh CONTENT="0; URL=http://www.sap-ag.de"> <title>New Page 2</title>

</head>

<body>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

<p> </p>

Loading ...... </p>

</body>

</html>

What is wrong?

Siggi

athavanraja
Active Contributor
0 Kudos

Hi,

The META refresh tag is not working withing SAPHTML control. Yersterday when i posted the code i didnt test it inside SAPHTML control. Sorry for that. Instead use the following code(i have tested and its working).


<html>

<head>
<title>New Page 1</title>
<script>
function loadurl(url){
window.open(url , "_self")
 }
</script>
</head>


<body onload="javascript:loadurl('http://www.yahoo.com')">
Loading . . . . . 
</body>

</html>

Regards
Raja

Former Member
0 Kudos

Hi Raja,

I currently checked your new example, and I get the same result as before. The only thing that is displayed in the html viewer is the html coding that you provided.

regards

Siggi

Message was edited by: Siegfried Szameitat

athavanraja
Active Contributor
0 Kudos

Hi Siggi,

Before posting the example i have tried the code in my system and it worked as expected. Can you please explain the setps you did. That may help to anyalyze the problem.

PS: Sorry for the dealy in responding, it was weekend here.

Regards

Raja

Former Member
0 Kudos

Hi Raja,

now we had our weekend, and I can answer again. I did everything you explained in your message from Dec 15, 2004 7:39 AM, but replaced the html-file with the content you provided at last. Additionally I imported the html file to my 'HTML templates for WebRFC applications'.

regards

Siggi

Message was edited by: Siegfried Szameitat

athavanraja
Active Contributor
0 Kudos

Hi Siggi,

I dont know whats the problem. its working in my system.

Lets do a test. The template which you have loaded in SMW0 download it to you local drive and view it using Internet Explorer and tell me what happens.

Regards

Raja

former_member534411
Participant
0 Kudos

Hi plz copy the peice of code into some Zprogram and run it if it solve your problem give points accordingly

code

-


DATA: percentage_text TYPE c LENGTH 5.

DO 100 TIMES.

WAIT UP TO '0.5' SECONDS.

percentage_text(3) = sy-index.

percentage_text+3 = '%'.

CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR' EXPORTING

percentage = sy-index

text = percentage_text.

ENDDO.

Regards

Suresh

eddy_declercq
Active Contributor
0 Kudos

Some javascript might help. It only works in MIE and it could look something like this

if (navigator.appName != 'Netscape') {

for (var i=0;i < document.all.length; i++)

document.all(i).style.cursor = 'wait';

}

Former Member
0 Kudos

There is a function module to show the progress:

SAPGUI_PROGRESS_INDICATOR

It's not what you want; however it may be useful.