• Resolved admiralchip

    (@admiralchip)


    Hello,

    This is really urgent so if you see typos in the post please bear with me.

    I’ve got some custom shortcodes where I made use of some javascript in script tags to get my page height to be as long as the content that is in my iframe. It worked well until I migrated my site to a different domain. I don’t know why this happened. The other javascript tags that I have on the same page to make a custom search that searches the content in the iframe and make anchor tags also stopped working. any ideas why this would happen? I suspected wp super cache so I deactivated and renamed it to see but that didn’t work.

    I’m using wordpress 4.2.4

Viewing 7 replies - 1 through 7 (of 7 total)
  • It’s hard to say exactly.

    1) I would update WordPress to the latest version.
    2) I would ensure all plugins and theme are on latest versions.
    3) Perhaps post the code you are using for the shortcodes (using pastebin), so we can see the code. (Save your code at pastebin; then paste the link back here. We can click that link and see your code.)

    Other than that… I can’t imagine why it is not working. I use custom shortcodes on my sites (all running latest WordPress version), and they still function properly.

    Thread Starter admiralchip

    (@admiralchip)

    If I updated to the latest version of wordpress and it doesn’t work, can I reinstall a lower version without losing anything?

    Unfortunately; I can’t say for sure.

    When WordPress updates a major version (like 4.3), it typically includes a database upgrade as well. If you downgrade after a database has been upgraded… it could cause potential risks.

    It is just a much better practice to stay updated on any plugins and themes you use; as well we the core WordPress.

    I would take a database backup; and a file backup; just to be safe ??

    Thread Starter admiralchip

    (@admiralchip)

    funnily enough when I add alert(“ok”); inside the tags that contain the javascript that isn’t working, I get the alert. I just have no idea why the other ones don’t work. I didn’t alter them from their working state. ??

    Post them on pastebin.

    I’ll take a quick look at the code.

    Thread Starter admiralchip

    (@admiralchip)

    found it. it turns out I got caught in the same domain thing with regards to iframes (not sure what it was called again). the page is in the same domain. It turns out that I didn’t add www.

    Thanks

    You bet.
    Glad you got it working properly ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Javascript in script tags stopped working’ is closed to new replies.