cancel
Showing results for 
Search instead for 
Did you mean: 

HTML Syntax check button

Former Member
0 Kudos

Hello experts I made a chg to an html template in SE80, bbpsc01, theme 99. I am getting an error on the page when i try to load the sc. I cannot tell what the error is. I tried view source already.

When i go back to SE80 in change mode the "check" button is greyed out. Is there another way to syntax check HTML?

Any advise is appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

H Jolee,

please detail what you have changed.

Otherwise I can not help you.

- Which template

- post the changed HTML code

Rgds

Christophe

Former Member
0 Kudos

Hi Christophe,

Thank you for responding. I changes I made were from SAP OSS Note 950730. I did obtain a license key to make the changes. The problem is the "syntax check" button is grayed out.

When I execute the shopping cart transaction in the EBP the catalog does not open (page is blank)and I get a message that there is an "error" on the page. When i go to view source no error is displayed. If I click on the error symbol it says "error object expected". Perhaps if the check button was available more information would be provided.

Trans SE80

1) Internet Services/BBPSC01. Added a new parameter "Catalog_ERROR_MSG. Saved and published.

2) Internet Services/SAPLBBP_SC_CAT_INFRAME. Replaced javascript function "callCatalog" with new code from note 950730. Saved and published.

Thanks inadvance for your help!

Jolee

Former Member
0 Kudos

Sorry Jolee,

I never worked with integrated catalog.

Anybody else ?

Otherwise you should continue with SAP Support.

Rgds

Christophe

pvanhoove
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

Stupid question maybe, but did you do the last steps of the note:

Important Note:

1. Don't press "Pretty Printer".

2. Run the transaction SITSPMON -> Templates and Mimes ->

Go to Invalidate cache and select System wide/Application server after finishing the changes and publishing

About the error, looks like a javascript error, and no syntax check is avaible in SE80 for html or javascript.

Just post here this htmlb template as suggest Christophe.

Rgds,

Pierre

Former Member
0 Kudos

Hi Pierre,

Thanks for your response and yes all of the steps in the note were followed.

pvanhoove
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

Post the htlm code, only way we can help you

Pierre

Former Member
0 Kudos

Hello Pierre,

Step 9 in ossnote 950730 includes a text file with the following which I added in HTML template SAPLBBP_SC_INFRAME. At the bottom of this message is the source code i see when i click on "view source". As you will see, the "if"/"else" statements are missing and you will see where i have commented out the old code.

I cannot thank you enough for taking the time to try and help me.

<b>Old Code:</b>

*********

function callCatalog(){

document.`bbpformname`.elements[0].value="UI_CAT_IFRAME_CALL";

document.`bbpformname`.submit();

}

<b>New Code:</b>

*********

function callCatalog(){

`if (~messageLine == "")`

document.`bbpformname`.elements[0].value="UI_CAT_IFRAME_CALL";

document.`bbpformname`.submit();

`else`

document.open();

document.write("`#CATALOG_ERROR_MSG`");

document.close();

`end`

}

<b>View Source Generates this:</b>

<!-- -


INCLUDING SCRIPT... -


-->

<script language=JavaScript src="/sap/its/mimes/bbpglobal/99/script/bbpscript.js">

</script>

<script language="JavaScript">

<!OSSNote 950730 Replace code begins here

function callCatalog(){

document.IFRAME.elements[0].value="UI_CAT_IFRAME_CALL";

document.IFRAME.submit();

}

-->

function callCatalog(){

document.IFRAME.elements[0].value="UI_CAT_IFRAME_CALL";

document.IFRAME.submit();

}

</script>

Former Member
0 Kudos

Jolee,

you made a mistake when commenting old code:

<!OSSNote 950730 Replace code begins here

should be coded like this:

<!-- OSSNote 950730 Replace code begins here

To avoid error, you can completly replace the old code.

Rgds

Christophe

pvanhoove
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello,

More than this, comment in a script definition (between <script> and </scipt>) begins with "/" ends with "/" .

"<!" and ">" will produce errors.

Try this:

<!-- -


INCLUDING SCRIPT... -


-->

<script language=JavaScript src="/sap/its/mimes/bbpglobal/99/script/bbpscript.js">

</script>

<script language="JavaScript">

/*

OSSNote 950730 Replace code begins here

function callCatalog(){

document.IFRAME.elements[0].value="UI_CAT_IFRAME_CALL";

document.IFRAME.submit();

}

*/

function callCatalog(){

`if (~messageLine == "")`

document.`bbpformname`.elements[0].value="UI_CAT_IFRAME_CALL";

document.`bbpformname`.submit();

`else`

document.open();

document.write("`#CATALOG_ERROR_MSG`");

document.close();

`end`

}

</script>

Rgds,

Pierre

Former Member
0 Kudos

Chrisophe and Pierre,

OMG - I cannot believe I did that!!!!! Many many thanks to you both!

Definite reward points!

jolee

Answers (1)

Answers (1)

Former Member
0 Kudos

I'm still having this problem. Anybody have any ideas?