| ★ wanayoo — archive 1999 http://webdeveloper.com/drweb/19970804-drweb.html | Nouvelle recherche | Portail wanayoo |
|
Click here to sign up for a FREE Refer-it Webmaster Account
|
Resolving a Browser Glitch In Downloading Proprietary Files With FTP ProtocolBy David Fiedler and Scott Clark Dear Dr. Website®: Recently, I put some files on our Web page (two kinds, actually--one is an .exe file, and the other one is our own proprietary format, a .w02 file) for our customers to download with the FTP protocol using a link of the following: <A HREF="ftp://our company.com/filename.w02">It turns out we had no problem downloading the executables from our FTP site, but when we try to download the .w02 files, Netscape Navigator reads the file as a text file and fails to go to the "save" option the way it's supposed to. This only happens when I use Netscape browsers. When I tested Microsoft Internet Explorer and Regent, both grabbed the file from our Web page just fine. This has to do with setting the MIME types on the server. The server needs to know what to do with a file that has the .w02 extension. As it is, it performs the default operation of showing it as a text file. You'll need to check the documentation for your particular Web server to find out how to add a MIME type. It is usually a pretty straightforward operation. Browsers, in turn, do different things with default files, which is why Internet Explorer could work when Netscape Navigator didn't.
Mirroring Site DirectoriesDear Dr. Website®: Do you know of some software that will mirror a directory on my local drive to my seven Web sites? I change, delete, and add several pages, and I want to hit a button and let a program publish all the changes to each of my sites without me having to think each time about which pages have been changed. I looked at FileDog by Edge Publishing and CuteFTP, but they aren't meant to solve this basic problem. I currently use the manual WS_FTP32 client. It works well, but I'd like to find a more automated solution. Run, don't walk, to NetLoad, a great program that does exactly this (on Windows 95/98 and NT, at least). These advisors use it to mirror the entire, fairly complex WebDeveloper.com site, ensuring that even if another member of the development team makes changes to a file on the site without others' knowledge, we'll have the latest files to work with, and send only the changed ones back up. It even compensates properly for different time zones.
Linking Within FramesDear Dr. Website®: How do I construct a link that will fetch a remote frames-enabled document, and open a link within one of the frames? Suppose I have a document called "boy.htm" with a frame called "timmy." The default page loaded into timmy is "timmy.htm." However, timmy.htm has a link to "billy.htm" that will open within the timmy frame when selected. Without opening the billy.htm page directly, I would like to open the billy.htm page within the timmy frame. What is the syntax for this link? Here's some JavaScript that'll do the job:
<SCRIPT LANGUAGE="JAVASCRIPT">
function openw(sURL)
{
newwindow =
window.open("","Boys","toolbar=no,directories=no,width=400,height=250");
newwindow.document.write ("<frameset COLS=\"100,*\">");
newwindow.document.write ("<FRAME SRC=/old?u=http%3A%2F%2Fwebdeveloper.com%2Fdrweb%2F%5C&y=1999"boyspage.htm\" NAME=\"BOYS\">");
newwindow.document.write ("<FRAME SRC=/old?u=http%3A%2F%2Fwebdeveloper.com%2Fdrweb%2F%5C&y=1999"" + sURL + "\" NAME=\"TIMMY\">");
newwindow.document.write ("</frameset>");
}
</SCRIPT>
You then use the code below in your link to billy (which opens the billy window in the
timmy frame). You can change which page is loaded simply by changing it in the link
below:
<A HREF="javascript: openw ('billy.htm')">Billy</A>
Visit The Dr. Website® Archives. Click here for a list of Dr. Website's most frequently asked questions (and answers!). Send your own question to Dr. Website®.
Copyright © 1999-2000 internet.com Corp.All Rights Reserved. Legal Notices. Contact the WebDeveloper.com® staff Last modified: Thu Jun 15 06:05:58 EDT 2000 |
Refresh Daily
|