HTML Code getting overwritten..


Registered User
17 posts

I think I am missing something simple here. I need to add a widget (HTML code) to few pages of my website. I have downloaded HTML editor and I am able to add the HTML code quite easily.

However, when I open my website in VSD (say, to perform some change) and then "save" the website, the HTML Code (widget) is overwritten/disappears.

How do I make the HTML code "permanent"?


Ambassador
1,611 posts

I f you have some code to add to VSD then you must open a html box and place it in there and click ok.
If you have modified a VSD html file it will not show changes if edited in another editor. Try putting your Widget's code in the html box in VSD then save it
The Guy from OZ



Registered User
17 posts

Thanks. Have a couple of questions:

1. I believe you are suggesting me to use VSD's "Add HTML" tool. When I click on "Add HTML", I also need to click on some place on my page "Insert HTML" for the popup (window) to appear where I can insert the Javascript code in "Body HTML". But clicking on some place on my page creates an odd rectangular shape, with comments "Click preview to see". How do I take care of this?

2. By using the above method, I am not sure how I can "control" where my HTML will go into. I am supposed to insert this Javascript code just above the </body> tag. Using HTML editor, I obviously have this flexibility of inserting the Javascript code just above the </body> tag. How do I accomplish the same in VSD.


Senior Advisor
3,122 posts

When you Use the HTML tool, you drag a box out on your page where ever you want the item to appear. If you have an exact size, you can enter the width and height in the Properties box. Also, there's the option to Edit HTML (body and/or head). You can always add/change things as needed. Within VSD, you'll only be able to see that place-holder box, but in preview or after publishing, you'll see your widget.
Back in VSD, you can drag that box around or use the arrow keys to nudge it into place.

Would this be for some analytics code? If so, you can click on Edit then scroll down to Add Analytics Code and paste it in there.

Let us know if you get it worked out (or not) :D
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams)
https://www.callendales.com


Registered User
17 posts

Thanks paintbrush. Your post completely makes sense. However, I want to insert that code "just above" </body> tag. I am still not clear from your post how I can do it using Add HTML tool of VSD.

I am actually trying to insert code for live chat (http://www.snapengage.com/).


Senior Advisor
3,122 posts

I usually just let VSD decide where it needs something to be :lol:
But in case someone else has any ideas, here's the instruction from the above link:

To install SnapEngage manually:

1. Copy the JavaScript code from within the SnapEngage Configurator from the Get The Code tab.
2. Place the JavaScript in the footer just before the </body> of your website on all the pages where you want to use SnapEngage.
3. View your website pages’s source code to ensure SnapEngage’s JavaScript is installed properly.


You may need to upload the file (Edit > Add Files, Save), then access your code on the server, or dashboard if you use SDrive. The problem with making changes outside of the VSD program is that VSD will over-write those changes the next time you Save/Publish.

Until some more experienced advice comes along... You could try just inserting it and see what happens. Or you could try using the Analytics insertion box because that does place the code at the bottom.
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams)
https://www.callendales.com


Senior Advisor
13,291 posts
Online Now

Why does the code need to be just above the </body> tag?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/


Senior Advisor
3,122 posts

I've heard of that as a preference so the site can load faster rather than it would if the JS came first, but this seems to be a small bit of code...
I would try letting VSD put it in and see what happens :D
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams)
https://www.callendales.com


Registered User
17 posts

Unfortunately it did not work when I let VSD insert the HTML code. The chat window (from snapedge) is coming up (as it should be), but the characters on the parent screen continue to be visible on top of the chat window.

Is there any way out of this? Everytime I do any change to my website, looks like I have to use HTML editor to make sure I remember to manually insert the javascript code "just above" the </body> tag. Quite a painful task and I might forget.


Registered User
17 posts

Have added a file with the screenshot of what I am getting, if I let VSD choose where it wants to insert HTML code. In the attached file, have highlighted (in Orange rectangle) the undesirable characters that are superimposing the chat window.
Attachments:

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.