WebSite X5Help Center

 
Steven Dobrowski
Steven Dobrowski
User

Custom html Code reported to have errors. Really?!  en

Автор: Steven Dobrowski
Просмотрено 791, Подписчики 1, Размещенный 0  

I have some custom HTML code that provides an in-line "Return to Previous Page" button link. The code is copied below.  The code works exactly as intended when live. However, in X5 Project Analysis, it reports that "there are errors in the custom code entered using the HTML object". I am trying to understand why there are apparently errors, when the code does exactly as intended. 

The HTML code is structurally and syntactically correct. Perhaps the X5 website development software has specific requirements or limitations when it comes to handling custom code, especially if it is entered using its own HTML object.

Can someone please advise?

Site url / example page:  https://www.photographixdesigns.co.uk/t84e2bozldlgrfactlqp.html

<!DOCTYPE html>

<html lang="en">

<head>

  <meta charset="UTF-8">

  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <title>Colored Text Button</title>

  <style>

    /* Style for the "RETURN to:" text */

    #returnText {

      font-weight: bold;

      color: black;

      font-family: 'Open Sans', sans-serif;

      font-size: 14px;

    }

  </style>

</head>

<body>

<span id="returnText">RETURN to:</span>

<button id="goBackButton" onclick="goBack()" style="padding: 10px 4px; background-color: transparent; color: white; border: none; border-radius: 5px; cursor: pointer; font-weight: bold; font-family: 'Open Sans', sans-serif; font-size: 12px;">

  <span style="color: blue;">SEND</span>

  <span style="color: black;"> this </span>

  <span style="color: red;">CARD</span>

  <span style="color: black;"> and </span>

  <span style="color: blue;">JIGSAW</span>

</button>

<script>

  function goBack() {

    // Using the history object to navigate back

    window.history.back();

  }

</script>

</body>

</html>

Размещено
5 Ответы
Claudio D.
Claudio D.
Moderator
Лучший пользователь месяца IT

Non è WebsiteX5 che ha il limite nell'uso dell'html
Sei tu che stai sbagliando !!!
Stai utilizzando dei tag doppi !!!
Non puoi avere 2 tag body , head etc etc... !!!

It is not WebsiteX5 that has the limitation in using html.
It is you who are doing it wrong !!!
You are using duplicate tags !!!
You cannot have 2 tags body , head etc etc... !!!

in the meantime eliminate this and try

and

Читать больше
Размещено От Claudio D.
Steven Dobrowski
Steven Dobrowski
User
Автор

Ah!!  So the HTML object already has the head/body tags in the object code. That makes complete sense now that you have illuminated my understanding.

I was working on the understanding that the object required full code head and body code.

Thank you.

Читать больше
Размещено От Steven Dobrowski
Claudio D.
Claudio D.
Moderator
Лучший пользователь месяца IT

the head ,and body tags are already in the page; no need to repeat them...

Читать больше
Размещено От Claudio D.
Steven Dobrowski
Steven Dobrowski
User
Автор

Yes, that is now understood. All is good. Thanks for the help.

Читать больше
Размещено От Steven Dobrowski
Claudio D.
Claudio D.
Moderator
Лучший пользователь месяца IT

well!

close this post.

Bye

Читать больше
Размещено От Claudio D.