Welcome to Michael Mahemoff’s blog.

I’m a hands-on software architect based in London, UK focusing on web technologies, in particular Ajax, and the author of Ajax Design Patterns (O’Reilly, 2006).

9 thoughts on About

  1. Hi Michael, I was reading some of your articles about IFRAME and JavaScript, but still remains one doubt.

    I would appreciate if you could help me. I am trying to use IFRAME in a website, but 90% of the references are from external websites, which means that I don’t have any kind of control of the “internal” content.

    When I link to these websites, some of then use JavaScript to control few objects, and when I am using IFRAME, it seems those requests got lost and a lot of funcionalities don’t work.

    Any suggestion!?


  2. Hi Felipe, I don’t fully follow your scenario, but I get the impression you are coming up against the standard cross-domain restriction of iframes; namely, that under normal circumstances, two “windows” (top-level or iframe) can’t talk to each other. Unless you use a hack like the cross-domain hack in my article, you can’t control the content of another domain’s iframe.

  3. Pingback: JES! - IE6 is older than ...

  4. Micheal,

    I wrote the following support request to snap.com:

    Dear sir/madam.

    I have a site, that through Ajax dynamically loads URL’s inside a on the page, after user action, long after the page has loaded. Adding the snapshots tag inside the or just before the works fine with static URL’s, but not with the ones loaded after the user action. The user action will get URL’s through ajax and add them to the result .

    I tried the following: After the result is filled with URL’s, I re-add the script like this:

    function reloadSnapShots() { var head = document.getElementsByTagName(“head”)[0]; var snapShotsScript = document.getElementById(“snapshots_script”); head.removeChild(snapShotsScript);

    var script = document.createElement("script");
    script.id = "snapshots_script";
    script.type = "text/javascript";
    script.src = "http://shots.snap.com/ss/cbf86571e3882ee57dc283706a1da41a/snap_shots.js";


    In the html of my page in the head section I have the following: This makes sure that the document.getElementById(“snapshots_script”); doesnt return an “undefined”.

    So, this trick works great, the first time i call this, directly after the first user action – not after page load!

    However, the second and all other times, this doesnt work.

    Is there any way to re-start the scripts scanning of all the links in a html document (even if they were added with Ajax/dhtml), to make them add the SnapShots preview functions to the URL’s?

    Ps, The site http://weborandom.com/ seems to have the same issue as i am addressing here. On first dynamic load of URL’s (under the randomize button) SnapShots URL enrichment works great. After hitting the randomize button, the SnapShots functions dont work anymore. That site uses the same technique as me to add the script tag after loading of the URL’s has finished.

    With kind regards, Roger Peters

    Do you have any idea why at “weborandom.com” this second time loading of the SnapShots script doesnt work?

    Kind regards, Roger Peters

Leave a Reply