I was trying to use a javascript code given to me on a website, but it was showing nothing on the page, this is the code
<script type="text/javascript" src="https://www.theviralmailerscript.com/viralemailformatter/editor.js"></script>
<script language="JavaScript">show_editor();</script>
I couldn’t find a solution online, so I went to ChatGPT and asked to find the problem with this code and it fixed it, this is the fix from ChatGPT
<script type="text/javascript" src="//www.theviralmailerscript.com/viralemailformatter/editor.js"></script>
<script type="text/javascript">
window.onload = function() {
show_editor();
};
</script>
The page has a message on top and then after that the script, but what happens now is that when the page loads, the top message appears and then disappears and just the javascript is visible
Look Here: https://viraltrafficmailer.com/themes/default/member-area/pages/email-formatter.html
This is the whole page code including the script
<!DOCTYPE html>
<html>
<head><meta charset="us-ascii">
<title></title>
</head>
<body data-gr-ext-installed="" data-new-gr-c-s-check-loaded="14.1196.0">
<h2 style="text-align: center;">Email and Text Ads Formatter</h2>
<h4 style="text-align: center;">Use this free tool, to Format your email for a better reading experience</h4>
<h4 style="text-align: center;">For Better results, a Maximum Line Length of 60 to 70 Characters is Recommended.</h4>
<h4 style="text-align: center;">Also, you can use this tool to Format your Text ads, with the Characters count Feature.</h4>
<p style="text-align: center;"><a href="dashboard.php">RETURN TO DASHBORD</a></p>
<p style="text-align: center;"></p>
<script type="text/javascript" src="//www.theviralmailerscript.com/viralemailformatter/editor.js"></script>
<script type="text/javascript">
window.onload = function() {
show_editor();
};
</script>
<grammarly-desktop-integration data-grammarly-shadow-root="true"></grammarly-desktop-integration></body>
</html>
last night looking for solutions I tried everything and had no luck
I place the code in the <head>
I place the code in the <body>
I even place the code in the <HTML> after the body
I don’t know how to code, I’m just an enthusiast, I code simple little things with the help of the internet.
Luis Javier is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.