Support » Plugin: Advanced iFrame » ai_external.js not found

  • Resolved Jason Judge


    I am trying to set an iframe to automaticllly resize to fit the content. The settings page tells me to load this JavaScript from the iframe site:

    The problem is, that page gives me a 404. I don’t have FTP access to the WP site, so I cannot see if the file really is there. Any ideas?

    The domain is correct and the URL is copied straight from the settings page. But still a 404 and no JavaScript.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’ve downloaded the plugin and looked at the code. There is only a ai_external.template.js there. Am I understanding this correctly that this file needs to be copied to ai_external.js and modified?

    Knowing the way WP will delete all the files in a plugin when it gets updated, isn’t that actually a bad place to put a customised file? Can it go anyway, in the theme perhaps?

    The code to change looks like this:

    var domain = 'WORDPRESS_SITE_URL';

    So is it a URL or a domain that needs to go in there? Do I use (the domain) or (a URL) or can I use // and not have to worry about whether I’m on http or https?

    If this script is called from the WP site, and needs to be customised to include the domain of the WP site, then am I missing something? Doesn’t the script already know the domain it is loaded from? If so, why does it need the domain to be hard-coded in the file?

    Okay, what wasn’t clear to me, is that just going to the settings page and saving will create the ai_external.js page automatically from the template, with the required settings in there.

    I think there is a lot of detail in the instructions that can confuse things. To have your iframe, containing content from another domain, automatically resize to the content it shows, there are two steps:

    1. Go to the settings page for this plugin. Save the settings.
    2. Add the specified JavaScript link to the bottom of your page delivering the iframe content.

    With all things being equal, that’s it, just those two steps.

    There are some conditions that need to be considered, but only if the above doesn’t work. Making sure http/https is consistent across the WP site and the iframe site, is one condition. What happens if the settings page does not have write permission to the JS folder (and it really shouldn’t for good security reasons, but did on my client’s site)? No idea. But honestly, worry about all that once you have followed step 1 and step 2 and find it still doesn’t work.

    One problem I now have, is that all the JS in the embedded form is now broken – it is not working at all. Firebug shows no errors, so I don’t know what is going on there.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘ai_external.js not found’ is closed to new replies.