Fetch Help > Windows > WebView Dialog (With Fetch Address Field)

WebView lets you set up a correspondence between files you are viewing in Fetch and the address of the webpage they are part of, so that you can easily review changes to your site in a web browser and copy the web addresses of those files.

When you click the Add or Edit buttons in the WebView Preferences pane, Fetch displays the extended WebView dialog so you can create a new WebView entry or modify the Fetch and web addresses of an existing entry.

Before you can use WebView, you must set up a correspondence between a folder in Fetch and the address of a webpage that folder represents. Normally, the best way to set up WebView is to connect to your file server, and then click the WebView button in the toolbar. (See the setting up WebView topic for more detailed instructions.) When you do that, you only need to enter the web address, because Fetch can get the Fetch address of your server from your connection. When you click the Add (+) button in the WebView Preferences pane, you must enter both pieces of information yourself.

Once you've set up WebView for a server, you can then click the WebView button in the toolbar of transfer windows to show the selected files or folders in your web browser. You can also use the Copy Web Address command to copy a web address (also called a link or URL) of the selected items in Fetch. For more information about WebView, see the WebView help topic.

To set up WebView for a server using the extended WebView dialog:

1. In the first field (with a Fetch icon), enter the Fetch address of the folder and server you want to set up WebView for. The Fetch address must contain your username, the server's hostname, and the path to your home folder on the server.
   1. An example of a Fetch address is `ftp://myaccount:@ftp.example.com/foldername/`
   2. Fetch addresses must be URLs — see the Uniform Resource Locators (URLs) help topic for more information.
   3. Usually you should enter the address of your home folder, or the folder containing your webpages.
   4. You can use the Get From Fetch pop-up menu to get the Fetch address of a currently open Fetch transfer window.
2. In the second field (with a globe icon), enter the web address corresponding to the Fetch address.
   1. Usually you should enter your domain name, or the address for your website's homepage.
   2. Examples of web addresses are: `http://www.example.com/myusername/` or `www.ExampleDomainName.com`
   3. You can use the Get From Safari pop-up menu to get the web address of a webpage currently open in Safari.
3. Click the Add button.

To test your WebView setup, you will need to connect to your server, possibly select a file, and click the WebView button. If the webpage that opens is incorrect — that is, it doesn't show you the page you expected, or it shows you an error — you may have entered an incorrect Fetch or web address and need to edit your entry.

To edit a WebView entry, either hold down the Option key when clicking the WebView button, or use the WebView Preferences pane.

When you create a WebView entry, Fetch tries to generalize it — if Fetch notices that the same folder name is at the end of both the Fetch address and web address, it will remove that folder name from both addresses to create a WebView entry that will apply to other folders on the server as well. While this should almost always be what you want, if for some reason you need to have the same folder name at the end of each address, you can edit the WebView entry using the WebView Preferences pane, and Fetch will not remove matching folder names.

The Get From Fetch pop-up menu is only available when there are open transfer windows.

The Get From Safari pop-up menu is only available when Safari is running and has open webpages. While WebView works with any web browser, the WebView dialog can only show you a list of open webpages from Safari due to limitations of other browsers.

Why doesn't Fetch automatically figure out web addresses for you? Unfortunately, there's no standard for specifying the web address of files on a server; each server uses its own method, and the method used by one server may not apply on another. There is no way for Fetch to ask your server which method it uses, so Fetch has to ask you instead. While the information for some popular servers is built into Fetch, in most cases Fetch needs your input. If you are not sure what the corresponding web address should be, you should contact your hosting provider or server administrator.

Related topics:

- WebView
- WebView Preferences
- Setting up WebView
- WebView dialog (web address only)
- WebView command
- Copy Web Address