adding java script to vsd - Post ID...

User 2333637 Photo


Registered User
114 posts

How do I add java script to VSD? I have this
<script src="http://remote.digitalgoodsstore.com/embed.js" type="text/javascript"></script>
that I need to add. The instructions I have are to "Include the JavaScript SDK on your page once, ideally right after the opening <body> tag" Is that even possible in VSD?
TandemMediaUSA.com

Jen
User 187934 Photo


Senior Advisor
20,267 posts

Hi Jen,
Try pasting the code into the body html of an HTML box and put it in the corner of your page out of the way and see if it works.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2333637 Photo


Registered User
114 posts

I've done that. I can't tell if it's working or not. When you click Buy Now, it's supposed to embed the cart - open up in a pop up without leaving the page.

http://www.1dollardownload.com/websiteicons.html

Am I wrong?
TandemMediaUSA.com

Jen
User 2147626 Photo


Ambassador
2,958 posts

Hi Jenifer, It appears that your JS code is inserted into the <head> and not the <body>, at least on your Home page. If it needs to be in the body go back into VSD and check your HTML block. There are two options there to insert code, <head> and <body> and make sure it is pasted to the <body>.

Then make sure to Edit/Add Files to add the .js and any other files needed to your VSD site. That way all the files will be uploaded when you publish your site.
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 187934 Photo


Senior Advisor
20,267 posts

Looks as though you have the script in the head as well as in the body. Remove the one in the head of the page and give it a try. The other thing to try is to insert the code in an html page made outside of VSD and use the add files to to add it to your site then code and iframe into your VSD page that you want it to be on. If this doesn't work I would ask the provider of the script what needs to be done.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 271657 Photo


Ambassador
3,816 posts

Maybe this might work...
VSD builds its code to reflect the order of items placed on the page. I'd try starting with a blank page and make the script the very first thing on that page.
I love deadlines. I like the whooshing sound they make as they fly by. (Douglas Adams)
https://www.callendales.com
User 2333637 Photo


Registered User
114 posts

Thanks, I'll start with the blank page. Should be a good exercise for me. Thanks for all of the replies.

Jen
TandemMediaUSA.com

Jen
User 2242722 Photo


Registered User
1 post

Hi.
Did you have any joy?
I'm trying to add HTML/JS code for Livefyre to a VSD website I'm working on and nothing gets displayed in preview. I'm not sure if it is just the preview not working...?

I tested the code on http://htmledit.squarefree.com/ and everything appears fine there. Just no luck with VSD.

Hence, wondered how you got on...

Ross
User 2147626 Photo


Ambassador
2,958 posts

Hi Ross,

Along with adding the HTML code to VSD, you need to add the files.
Select Edit from the top menu, then select Add Files from the drop down.
Add the .js file, and any other file you may be adding.
After this, you should be able to preview the site.
When you publish the site, those files will upload along with the rest of the site :cool:
Graphics for the web, email, blogs and more!
-------------------------------------
https://sadduck.com
User 187934 Photo


Senior Advisor
20,267 posts

Ross wrote:
Hi.
Did you have any joy?
I'm trying to add HTML/JS code for Livefyre to a VSD website I'm working on and nothing gets displayed in preview. I'm not sure if it is just the preview not working...?

I tested the code on http://htmledit.squarefree.com/ and everything appears fine there. Just no luck with VSD.

Hence, wondered how you got on...

Ross


Many scripts don't work from your local pc but are fully functional after you upload and preview online.:)
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com

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.