Javascript Code In Blocks

Hello. I've been trying to add code into a block to display SSL certification. When I save the html block, it changes the code. Here is what I want to insert:

Essential SSL

Here is what happens when I save it:


I have tried it with and without the {/literal} tags. Notice how it changes the code.

How do I fix this? Any help is appreciated. Oh, I can't seem to find where it tells me the version number, but it is the last 2.x whatever version. I'm too afraid to upgrade to version 3 or 4, even though I bought the license for it.

When you say "add code into a block" do you mean entering it via the admin interface (I.e. an html editor) or do you mean using an outside program and actuallly editing the template?

It would appear you are not editing the template but instead trying to use an html editor too insert it into the content of a block.

Im talking about an html block in the site design, not editing a template. Im trying to get the ssl image and info into a block to position it in the right column. Is there a way to edit the template to position it in the right column?

Turn off the html editor you are using to update the block content. If you're using V2.x then your script content should say exactly where you place it. Under V4.3.x, you'd have to add an additional attribute to the script tag to prevent it from being deferred to the end of the page.

Did you try HTML block with Smarty support? For some reason it works better with javascript

Turn off the html editor you are using to update the block content. If you're using V2.x then your script content should say exactly where you place it. Under V4.3.x, you'd have to add an additional attribute to the script tag to prevent it from being deferred to the end of the page.

I'm just using the in software html editor that comes with CS Cart. I don't know how to turn it off.

What I finally ended up doing was to go into the database directly and add the code into the description for the block, and it stayed how it was saved so it finally works.

Thanks for the help tony. Just didn't know how to do what you mentioned.

By the way, using CS-CART: version 2.2.5 PROFESSIONAL

Probably need to update it.

Did you try HTML block with Smarty support? For some reason it works better with javascript

I was using the CS Cart HTML block. Don't know what "with Smarty Support" means. I finally just ended up putting the script into the database directly.

Thanks.

I was using the CS Cart HTML block. Don't know what "with Smarty Support" means. I finally just ended up putting the script into the database directly.

Thanks.

I am glad to hear that the issue solved. HTML block with Smarty support was added to 4.x versions.

When you have html editor problems, you can turn it off (or goin into Source mode) by one of the icons (depending on the ediitor being used, it is usually far left or far right). You can toggle between source mode (raw html) and WSISWYG mode.