Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

JAVACRIPT ERROR using HTML_VIEWER

Former Member
0 Likes
807

Dear expert, I'm founding problem to display a html page wirh HTML_VIEWER.

The page content is ok (all the image and text are displaied) but a javacript error occurs.

If I click to "OK" to the message the page is shown correctly.

My question is:  is there the way to suppress script error message using HTML_VIEWER?

I'm using the following methods and for me are ok:

   CALL METHOD html_control->load_data
    IMPORTING
      assigned_url         = doc_url
    CHANGING
      data_table           = i_tab[]
    EXCEPTIONS
      dp_invalid_parameter = 1
      dp_error_general     = 2
      cntl_error           = 3
      OTHERS               = 4.

  IF sy-subrc EQ 0.
    CALL METHOD html_control->show_url
      EXPORTING
        url = doc_url.
*        IN_PLACE = ' '.

Thank you in advance,

Davide

6 REPLIES 6
Read only

Former Member
0 Likes
767

Is it a specific error?  It may be that IE is prompting to run the javascript, which is by design.  Check out the bottom of this thread for more information.

http://scn.sap.com/thread/955389

Read only

0 Likes
767

Hi, It's a specific error. I'm not using IE but HTML VIEWER in a ABAP modue pool.

The error is not relevant for my html, in fact it works correctly. I don't know the reason of it but, anyway,i'm only interested to suppress it. Is it possible ?

Regards,

Davide

Read only

0 Likes
767

What is error? Can we see the screen shot? Do you get the same error while running the demo program SAPHTML_DEMO1.

HTML uses IE to render the page and display.

Regards,
Naimesh Patel

Read only

0 Likes
767

Chances are it is Internet Explorer.  Using the HTML_VIEWER and browse to http://detectmybrowser.com/ .  In any case, the javascript error will need to be handled to avoid the behavior you're seeing.

Read only

0 Likes
767

Hi, i cannot run the program SAPHTML_DEMO1 because I'm not using a URL WWW... but I'm using HTML VIEWER to upload an external HTML FILE.

The error that I have is

Script error:an error has occurred in the script on this page

Error: Access  is denied

http://static.pgol.it/pg/jsman/-l-2m-0-k-1-h-1p-2n-r-s-t-u-v-10-1o-19-26-11-12-33-20-1s-21-2d-1d-1e-...

Here I cannot attach html file becuase the format is not supported, but in case I can send you the file by mail to check it.

The strange  thing that I don't understant is  that I have the following error using IE, but if I open the html using a notepad and save it again, then It works.

How is it possible ?

Regards,

Davide

Read only

0 Likes
767

Can you download the content of  i_tab[] as text file from the debbuger tool and upload that text file?

It will be easier to find the issue.