custom html and js

robert1046
2 Posts
robert1046 posted this 01 February 2022
Ask a Question

How should I add the html part of the code and the two script sections of the code in nicepage. It is not working for me. Paypal buttons are not displaying at all in nicepage. I attach a file with custom html and js (from Paypal)

How should I add the html part of the code and the two script sections of the code in nicepage. It is not working for me. Paypal buttons are not displaying at all in nicepage. I attach a file with custom html and js (from Paypal)
Vote to pay developers attention to this features or issue.
5 Replies
Order By: Standard | Newest
Support Team
Support Team posted this 03 February 2022

Hi Robert,

If there are no additional instructions from the code developers, you can add HTML, CSS and js code to the HTML element. Or you can add HTML to the HTML element and js to the Page Settings >> additional HEAD HTML. But Nicepage does not execute third-party scripts directly in the editor. It will be executed in the browser preview only.

I've checked your code on my side.
The problem is that when you insert custom code in Nicepage, it generates the page and makes all page code readable including custom HTML. In other words, it adds line breaks.

before:

<div id="invoiceidDiv" style="text-align: center; display: none;"><label for="invoiceid"> </label>

after:

<div id="invoiceidDiv" style="text-align: center; display: none;">
   <label for="invoiceid"> </label>

The script that works with this HTML is hardcoded to the structure without line breaks. This causes an issue with the code on the Nicepage page. But if you replace the block of HTML code with line breaks with the original code after the exporting, the button will appear ok. But you can do it with the exported HTML website only.

Please let us know if you have any further questions.

...................................................
Sincerely,
Olivia
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi Robert, If there are no additional instructions from the code developers, you can add HTML, CSS and js code to the HTML element. Or you can add HTML to the HTML element and js to the Page Settings >> additional HEAD HTML. But Nicepage does not execute third-party scripts directly in the editor. It will be executed in the browser preview only. I've checked your code on my side. The problem is that when you insert custom code in Nicepage, it generates the page and makes all page code readable including custom HTML. In other words, it adds line breaks. before: <div id="invoiceidDiv" style="text-align: center; display: none;"><label for="invoiceid"> </label> after: <div id="invoiceidDiv" style="text-align: center; display: none;"> <label for="invoiceid"> </label> The script that works with this HTML is hardcoded to the structure without line breaks. This causes an issue with the code on the Nicepage page. But if you replace the block of HTML code with line breaks with the original code after the exporting, the button will appear ok. But you can do it with the exported HTML website only. Please let us know if you have any further questions. ................................................... Sincerely, Olivia Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
robert1046
2 Posts
robert1046 posted this 04 February 2022

I've edited an exported index.html file and pasted html and javascript code without linebreaks into it. It is still not working for me. I've attached the exported/edited site. Please help

I've edited an exported index.html file and pasted html and javascript code without linebreaks into it. It is still not working for me. I've attached the exported/edited site. Please help
Support Team
Support Team posted this 04 February 2022

Hi Robert,

Please check the attached project. I copied all code from the provided txt file to the HTML element DIV and removed the code from HEAD section. It works ok on my side. But please correct titles as they are broken in the txt file because of the wrong encoding.
Please let us know if you need our further assistance.
...................................................
Sincerely,
Olivia
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi Robert, Please check the attached project. I copied all code from the provided txt file to the HTML element DIV and removed the code from HEAD section. It works ok on my side. But please correct titles as they are broken in the txt file because of the wrong encoding. Please let us know if you need our further assistance. ................................................... Sincerely, Olivia Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
lori
18 Posts
lori posted this 01 March 2022

I've edited an exported index.html file and pasted html and javascript code without linebreaks into it. It is still not working for me. I've attached the exported/edited site. Please help

Did you figure out how to add paypal button?
Thanks
Lori

> I've edited an exported index.html file and pasted html and javascript code without linebreaks into it. It is still not working for me. I've attached the exported/edited site. Please help Did you figure out how to add paypal button? Thanks Lori
MerlinAZ
2696 Posts
MerlinAZ posted this 01 March 2022

Don't know if you saw this?
https://www.paypal.com/us/smarthelp/article/how-do-i-add-a-paypal-payment-button-to-my-website-faq3629

Don't know if you saw this? https://www.paypal.com/us/smarthelp/article/how-do-i-add-a-paypal-payment-button-to-my-website-faq3629
You must log in or register to leave comments