Viewing 5 replies - 1 through 5 (of 5 total)
  • The short answer is no.

    Javascript and HTML are two very different technologies.

    HTML is a markup language meant to describe to a browser how the information on a web page is to be structured. Javascript is a scripting language handles interactivity, and can dynamically change the structure, appearance (by changing element styles), and even content of an HTML page. It can animate element, delete them, collect and process data, you name it.

    Thread Starter Uendi

    (@uendi)

    Thanks for your prompt reply.

    My problem is the merchant give me a javascript code and I am wondering whether this code can be paste in my post or not.

    Well, if you want more help, we’ll need some extra information about what the context your code is being used in. I would recommend starting a new thread pursuant to the Forum Welcome, and clearly lay out what your specific issue is.

    If that is all, then have a nice day.

    My problem is the merchant give me a javascript code and I am wondering whether this code can be paste in my post or not.

    Not by default. There’s some plugins that can allow Javscript in posts, but as a normal function it’s stripped out of any post content.

    You can have it working on your page though in a few different ways. The first option is setting up a custom page template and that can hold your Javascript code. This would really only be useful if the code is system-wide and isn’t going to change.

    The second, and what I’d think would be the most useful, option is to set up shortcodes for the Javascript so you can call the shortcode and it will insert your code where it needs to be. Doing it this way lets you add it inside post content without it being stripped out by the parser.

    Thread Starter Uendi

    (@uendi)

    I may consider of your suggestions and try to have it works.

    Anyway, thank you so much to both of you, Steneau and catacaustic

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Javascript code to HTML code’ is closed to new replies.