View Full Version : Help with Hyperlinks
Ben@WEBProp
06-23-2003, 06:03 PM
These are probably really really extremely easy questions, but I'm a newbie, so give me a break. So I got 2 questions:
1)How do I hyperlink to a Word Document (or any other type of other document, such as .zip) so that when the text link is clicked, the "select whether you want to save it to your hard drive or open it from it's current location" box is opened and the user selects his/her option?
2)When linking from a nav bar in frames, is there a way that I can have one link clicked on the nav bar and have content changed in 2 other target frames at the same time without using JavaScript?
Thanks for all your help:thumbsup: !
-Ben
sage45
06-23-2003, 07:43 PM
1.) place your link to whatever you want the user to open/save... Keep in mind that in most situations the user's machine will attempt to open the linked external document/data into the program that is either associated with it, or open it within the browser using a built-in function created by the application associated with the file...
2.) no there is no way to do it without using javascript...
There are however, many different ways of completing this with using javascript... My favorite way is this:
<HTML>
<HEAD>
<TITLE>Change Frames</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function setFrame(frameName, frameSrc)
{
parent[frameName].location=(frameSrc);
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<A HREF="javascript:setFrame('frame1','frame1.htm');setFrame('frame2','frame2.htm')">This link changes two frames</A>
<BR>
<A HREF="javascript:setFrame('frame1','frame1.htm');setFrame('frame2','frame2.htm');setFrame('frame3','frame3 .htm')">This link changes three frames</A>
<BR>
<A HREF="javascript:setFrame('frame1','frame1.htm');setFrame('frame2','frame2.htm');setFrame('frame3','frame3 .htm');setFrame('frame4','frame4.htm')">This link changes four frames</A>
</BODY>
</HTML>
Where:
frameName - is the name of the frame you wish to change.
frameSrc - is the content you wish to place into the frame.
The frame name is specified here:
<FRAMESET ROWS="10%,80%,10%" FRAMEBORDER="NO" FRAMESPACING="0">
<FRAME SCROLLING="NO" NORESIZE FRAMEBORDER="NO" SRC="topbar.htm" NAME="topbar">
<FRAMESET COLS="25%,75%" FRAMEBORDER="NO" FRAMESPACING="0">
<FRAME SCROLLING="AUTO" FRAMEBORDER="NO" SRC="sidebar.htm" NAME="sidebar">
<FRAME SCROLLING="AUTO" FRAMEBORDER="NO" SRC="main.htm" NAME="main">
</FRAMESET>
<FRAME SCROLLING="NO" NORESIZE FRAMEBORDER="NO" SRC="logopage.htm" NAME="logobar">
</FRAMESET>
HTH,
-sage-
pardicity3
06-23-2003, 08:34 PM
1) Like sage said, though about the only things you can be positive will download are .zip files. You can also force download using a server-side language so you can make any file you want force download.
2) Like sage said again :)
Ben@WEBProp
06-23-2003, 09:24 PM
How can I force the download? I would appreciate that code very much. Do you have it, or should I start a new thread in one of the server-side forums?
Thanks a ton!
-Ben
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.