Iframes or what else????



  • Hi Everybody



    I just subscribe to this list. I am not a programmer but I enjoy all

    Internet technologies. My interest is to adapt scripts, interfaces for

    the service of translators and terminologist.



    Here is my problem.



    I wrote that page

    http://www.francopee.com/eureka/page_1.htm

    which contains three iframes.



    The first iframe contains a search engine by default.

    The purpose of the page is to target linked documents found by the

    search engine from the iframe 1 (top one) to the iframe 2 (the middle

    one) and the linked documents from the iframe 2 to the iframe 3 (the

    bottom one).

    NOTE : my english is not so good, please feel free to ask me more

    explanations.



    I dont know the solution of the problem. The page does not work

    actually. I used the target function in the codes. Is there a way to

    interact with URLs dynamically generated by a search engine? How can I

    attribute the target function to thsoe URLs? Do I need a javacsript?



    Any help would be really appreciated



    Best regards, Yvan Cloutier



  • Hi Yvan,

    I am fairly certain the the target is specified in one of two places, in a BASE tag or in the A tag itself, e.g.:

     <base target="yaya"/> or <a target="yaya" href="?">...</a>

    I can think of two ideas ...

    1) What you *may* be able to do (and I dont know for certain), is attach a javascript event to the frame's onload function. In the script, loop through each A element and set the target to your frame.

    2) Use XMLHTTP on the client or server to get the contents of the search page, and replace the "A" with "A target="

    Does that help?

    -- Alex



  • Alex, I think that is gonna run into a heap of 'access denied' errors. It's extremely difficult to find a way to alter a page from a host different than that of your scripts...

    The only way I've found to do it under Internet Explorer is by creating a custom entry in the context menu of the page.

    Drak



  • @Drak said:

    Alex, I think that is gonna run into a heap of
    'access denied' errors. It's extremely difficult to find a way to alter
    a page from a host different than that of your scripts...





    Just as well, too. Opens up a whole new world of security holes.



  • @Drak said:

    Alex, I think that is gonna run into a heap of
    'access denied' errors. It's extremely difficult to find a way to alter
    a page from a host different than that of your scripts...

    The only way I've found to do it under Internet Explorer is by creating a custom entry in the context menu of the page.

    Drak


    I don't think Alex was proposing that.
    I think he was saying, get the content from the remote site, parse it to change the target of any links (regex would work nicely), then send that to the browser. The remote content never changes, it's just intercepted and altered before it reaches the browser. It actually gets served from Yvan's server.

    Or am I just confused?



  • Assuming the visitors add the site to the Trusted Sites (not a horrible requirement if it really is a trusted site) ...  the remote-frame modification may work (I have no idea though).

    But option #2, the idea was to use XMLHTTP on the client and parse out the text. I suppose that could also be done on the server as well.



  • @Alex Papadimoulis said:

    But option #2, the idea was to use
    XMLHTTP on the client and parse out the text. I suppose that could also
    be done on the server as well.


    Oh! Sorry for misunderstanding.



    Sure, client side would work. I might still want to do it server-side
    to take advantage of  more industrial-strength lanquages than
    JavaScript.



    damn...now I'm curious...gonna have to give it a try. Thanks for ruining my night's sleep...


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.