VI. MARCO TEÓRICO
6.2. Bases Teóricas
One of the most common operations that you perform on a Web page is to create hyperlinks to content. Hyperlinks provide navigation for Web sites and link content placed at different locations inside a Web site. The basic attributes of a hyperlink include display text and a URL that the hyperlink points to. When you click hyperlinked display text, the Web browser directs you to the URL connected to that hyperlink. You can create hyperlinks to almost any type of content, includ-ing pictures, Web pages, documents, executables (.exe, .dll, etc.), and bookmarks.
You create hyperlinks in SharePoint Designer by using the Insert Hyperlink dialog box, as shown in Figure 5.15. You access this dialog box by choosing Insert ➪ Hyperlink or pressing Ctrl+K. This dialog box is also used for editing hyperlinks (although the name changes to Edit Hyperlink).
The Insert Hyperlink dialog box allows you to create hyperlinks by using these panes:
n Existing File or Web Page: The default pane allows you to choose a file from the Current Folder, Browsed Pages, or the Recent Files list. The files or Web pages that are currently open in SharePoint Designer show up with (open) at the end of the filename.
You can use the Look in dropdown menu to locate the content you want to create a hyperlink for.
n Place in This Document: Allows you to create hyperlinks to bookmarks on the Web page you currently have open in SharePoint Designer. If no bookmarks have been cre-ated, the list is empty.
n Create New Document: Allows you to create a hyperlink to a new document. The inter-face allows you to change the location of the new document and then specify a target frame for the hyperlink. You can also choose whether you want to edit the newly created document right after creation or later.
n E-mail Address: This option allows you to create a hyperlink to an e-mail address and specify parameters.
FIGURE 5.15
The Insert Hyperlink dialog box
Also, there are a number of buttons in the Insert Hyperlinks dialog box that allow for these operations:
n Screen Tip: Allows you to specify the screen tip displayed when you hover over a hyper-link. A screen tip can be used to display information about the content that the hyperlink points to.
n Bookmark: Displays the list of bookmarks present on the document that you’ve chosen as the URL for the hyperlink and allows you to add the bookmark to the hyperlink n Target Frame: Allows you to choose the frame where the target document of the
hyper-link should open
n Parameters: Allows you to specify parameters sent along with the hyperlink. These parameters form the query string in the hyperlink and can be used by the target docu-ment for performing various operations. This is especially useful in performing form-based operations by using ASP, ASP.NET, and FrontPage components.
n Remove Link: Removes the link from the Web page
Bookmarks act as anchors that you can insert on Web pages at specific locations of interest and later use hyperlinks to navigate to those locations. They’re especially useful if you have a long Web page and you want a Web browser to be able to go directly to a location on the Web page rather than have a user scroll down to the location. You can create a bookmark on a Web page by follow-ing these steps:
1. Place the cursor at the location on the Web page where you want to create the bookmark.
2. Press Ctrl+G or choose Insert ➪ Bookmark to open the Bookmark dialog box, as shown in Figure 5.16. You use this dialog box to manage the bookmarks on the Web page.
FIGURE 5.16
The Bookmark dialog box
3. Type the name of the bookmark and then click OK.
When you view the Code view after inserting a bookmark, the bookmark is just an <a> tag with a Name attribute specified for it. To create a hyperlink to your newly created bookmark, follow these steps:
1. Select the text on which you want to create a hyperlink. This could be a word or line of text at the top of your Web page. When you click the hyperlink, the browser takes you to the location on the Web page where the bookmark was placed.
2. Right-click on the selected text and then choose Hyperlink from the popup menu.
Or you can click the Hyperlink button on the Common toolbar to open the Insert Hyperlink dialog box. The Text to display box shows the text you selected on the Web page for creating the hyperlink on.
3. In the Existing File or Web Page pane, choose the Web page where the bookmark exists.
4. Click the Place in This document icon. The Select Place in Document dialog box opens, displaying all the bookmarks in the document selected in step 3.
5. Choose the bookmark you want to use with the hyperlink and then click OK. The bookmark is indicated in the hyperlink by its name after the # sign.
6. Click OK.
To preview the Web page in a browser, press F12. If the page is long enough (to activate scrollbars in the browser), when you click the newly created hyperlink, the page automatically scrolls to the location of the bookmark.