• This is a very strange problem, I have just moved my site from one host to another (powweb to Krystal) which may or may not be related to the problem.

    I noticed that the availability calendar for the site no longer works. I looked at the code and noticed the link was missing.

    I should have been this

    <form><input type=”button” title=”Availability calendar Villa Begur” value=”Availability calendar Villa Begur” onclick=”window.open(‘https://www.availcheck.com/cgi-bin/calendar.cgi?propid=4881&#8217;)”></form>

    And instead it shows this

    <form><input title=”Availability calendar Villa Begur” type=”button” value=”Availability calendar Villa Begur” /></form>

    I corrected the new code into the “text” tab, but bizarrely it didn’t correct it, after a bit more testing I noticed that typing the code into the “text” tab, clicking on the “visual” tag and then clicking back to text changes the code from

    <form><input type=”button” title=”Availability calendar Villa Begur” value=”Availability calendar Villa Begur” onclick=”window.open(‘https://www.availcheck.com/cgi-bin/calendar.cgi?propid=4881&#8217;)”></form>

    to this

    <form><input title=”Availability calendar Villa Begur” type=”button” value=”Availability calendar Villa Begur” /></form>

    As I want the site working I replaced it with a simple hyperlink in the prices/availability page and created a test page with the issue replicated.

    https://www.begurvillas.com/test/

    Any ideas?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello blandfordp,

    I understand that you are not able to enter Javascript code in the WP Editor text area. The issue is that WordPress editor both autoformats your text and restricts the types of tags that are inserted into your content. So by default, it does not allow Javascript tags in the editor.
    In case if your website is used by multiple authors, they may insert malicious code in your website through the editor. This feature is there to protect you.

    For certain cases, you can get around this problem.
    Please go through the following article to get around this issue in WordPress.
    https://www.godaddy.com/garage/3-ways-to-insert-javascript-into-wordpress-pages-or-posts/

    Thanks
    Yashita

    Thread Starter blandfordp

    (@blandfordp)

    Thanks Yashita

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problem copying code into a site’ is closed to new replies.