RootsWeb.com Mailing Lists
Total: 1/1
    1. [FreeHelp] An Alternative to Pop-up Windows
    2. Barry Carlson
    3. I've been looking at alternatives to 'iFrame' and 'popup' windows that make HTML calls to the server, and found that with a little adaption a pseudo window created as a div can be used to call for a .txt file from the server - provided the file called is on the same domain. This method is generally acceptable for downloading text data, but with some judicious manipulation is capable of downloading and displaying just about any sort of file using the .txt extension. It works equally well in all browsers back to and including IE5.01 and makes use of the xmlHttpRequest object to implement, using JavaScript, the retrieving of data from the server. A test file containing 5 .txt links is at:- http://freepages.computers.rootsweb.com/~bristowe/xhr/xhr-test.htm W3C browsers interpretation of what is a cross-domain link is stricter than that imposed by the MSIE browsers. This means that a link on the same domain must be exactly that, i.e. in your same freepages community, e.g. freepages.genealogy.rootsweb.com/~user and freepages.computers.rootsweb.com/~user are treated as sub-domains, and W3C browsers will not allow cross access, whereas MSIE browsers will. Each link has been configured on a "no-cache" principle, and each call retrieves data from the server and not the browser cache. The downloaded file carries its own styles along with styles to modify the pseudo window size and colors, along with title information that is displayed in the top of each frame. Finally, a version where the window frame is draggable (in all browsers back to IE5.5) by clicking on the top bar is at:- http://freepages.computers.ancestry.com/~bristowe/xhr/draggable-div.html Tip!... Drag the frame to where you want it, and successive frames will open in the same position. Barry

    01/23/2011 10:20:02