Script Tips
NOTE: Copy and paste to NOTEPAD before entering scripts into the html view, if you don't the scripts will not work.
Tip 1 Avoid having your pages open into someone else's frame
If you want to protect your pages from being opened within a frame, use the following script:
<SCRIPT>if (self != top)top.location = self.location</SCRIPT>
This code checks to see if this page is the top page (i.e., that its being loaded into the original window rather than into a frame). If it isn't, the page is set to load into the original window.
Further to this...'At times, site frames can be useful, but when they don't clear themselves from your browser when you click on "outside" links, they become annoying. So, next time this happens in IE4, simply click (and hold) a link, then drag & drop it onto the address line of your browser. Voila -- no more frames! You may also drag & drop links into folders or onto your Desktop; it's a link's greatest adventure.'
(Tip found at Lockergnome)
Tip 2 Auto-updating
Want to add an auto-updating splash page? Simply open the Page Properties dialogue box, then select the Custom Tab and then the Add button. Under Name, type in "refresh", then under "value" enter "10;URL=http://www.yourwebsite.com/" where "10" is then the number of seconds before it redirects to the new location.
Tip 3 No hyperlink decoration.
NOTE: This script, because it makes use of a style sheet capability, is only viewable in versions 4 and above of both Netscape and Internet Explorer, all other browsers will ignore it.
To implement this link by link in FrontPage 2002 just select the link and right click | Choose Font and untick the underline box. Press ok
To implement this for the whole page you will have to insert the style codes directly into the html view.
NOTE: Copy and paste the code into Notepad FIRST then copy and paste from Notepad to your web page. This removes unwanted formatting.
To remove decoration for the entire page
<style>
<!--
a {text-decoration: none}
-->
</style>
If you don't want to remove all underlined links, but just specific ones on a page. After inserting the above code between your HEAD tags, you can encase the link in question with the following code:
To remove decoration link by link
<a href="yourlink.htm"
style="text-decoration:underline">
click here</a>
NOTE: Getting rid of the underlines in links throughout a page can only be done in FrontPage 2000/02 by using either style sheets or line style tags, but in FrontPage 98 you can do this directly in the following manner.
Select hyperlink
Click on the Hyperlink Icon or Edit | Hyperlink properties
Click Style | Text | Decoration
Select 'None'
Press ok twice
Tip 4 Text colour change onMouseOver.
Open your page in FrontPage. Choose the 'HTML View'. Create a new blank line above the <\head> tag. Insert the code below and OK out.
<style><!--a:hover{color:red;} // --></style>
You can change the colour to what you want e.g. Green.
or if you want different colours for different links you can do it this way...
<style><!--a.one {color: black}--></style>
<style><!--a.two {color:blue}--></style>
Then for your individual links in the body do this.
<p><a class="one" href="http://www.blah.com">http://www.blah.com</a></p>
<p><a class="two" href="http://www.test.com">http://www.test.com</a></p>
This will give you separate colours for each.
Here are a couple of site where you can learn more about CSS.
CSS Pointers Group
WDVL
Tip 5 Pop up text box or Tool Tip
Small yellow pop-up messages that appear to explain the function of a button in most windows applications can be made to appear on your website. Using the 'title' tag. This is designed to be used as explanatory system for little-known acronyms. For example, the code.
<A title="What You See Is What You Get">WYSIWYG</A>
WYSIWYG Put your cursor over wysiwyg to the left and watch an explanation pop up, viewable only in IE.
Or you can use this in conjunction with a hyperlink like so:
<A href="http://anyfrontpage.com/bytes/" title="The FrontPage Ezine of Choice!!">
AnyFrontPage Bytes Ezine << Mouseover
would make a Tool Tip appear when the user places their mouse cursor over the WYSIWYG text in the Web browser. You can now see this feature used in my tutorials and How-to's etc throughout out this website. Any text in this colour grey denotes a Tool Tip!
OverLib
JavaScript pop up windows when you mouse over links.
Tip 6 NoSpam thankee Mam
The HTML Encoder is a service of SiteUp Networks. The Encoder will format your E-mail address in a way that IS NOT readable by any E-mail extractor or search engine. Just enter your E-mail and click the Encode button. Your SPAM proof address will arrive in your Inbox in a few minutes.
NOTE: you do not need to subscribe to their newsletters.
Tip 7 How to make a website your home page
<a href="#" onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://accessfp.net');">Click here to make AccessFP your default homepage</a>
Substitute the URL and change 'Click here to make AccessFP your default homepage' to what ever text you would like. Put the code wherever you want on the website and it should work.
Tip 8 Bookmark this page
Would you like your visitors to book mark pages in your your site? Enter the below code anywhere you want it to appear, Change the text 'BookMark' to whatever you want to appear.
BookMark Click this link to check out the code
<a HREF=index.html#" ONDRAGSTART="return false" ONCLICK="window.external.AddFavorite(location.href, document.title);return false" ONMOUSEOVER="window.status='Add to Favorites';return true">BookMark</a>
NOTE: Copy and paste to NOTEPAD before entering into the html view.
This will only work in Internet Explorer if other browsers press control + D
Tip 9 How to recommend a friend
<span onclick="location='mailto:?subject='
+top.document.title+'&body=Hi, just visited this page at '+top.location.host+' and wanted to share it with you, take a look: '+top.document.location+''"
style="CURSOR: hand" )>Recommend A Friend</span>
Insert the above where you want the link to appear, the bits you can edit are in red.
Tip 10 How to make an email link pop up with a message in the subject line and the body configured. The Cc or Bcc as well if you want! Can be used for Netscape or IE.
Example code
TinaClarke@accessfp.net?Subject=Web Site Feedback&Body=Hi, I am just testing your tip&CC=TinaClarke@accessfp.net
Example Link
Type the text you wish to use as link for your Email link. e.g. "Email the Webmaster". Click on 'Hyperlink' under 'Edit' from the toolbar or click the 'Hyperlink icon'. Click on the mail icon shaped like an envelope in the 'Create Hyperlink' box that pops up. In the new box named 'Create an E-mail Hyperlink' that pops up enter the following:
After you have entered your email address e.g. "TinaClarke@accessfp.net" (without the quotes).
Next you type " ?Subject= " (without the quotes)
Enter the text you wish to appear in the 'Subject line' e.g. "Web Site Feedback" (without the quotes).
Then you add " &Body= " (without the quotes).
Next you type the text you wish to enter for example "Hi, I am just testing your tip" (without the quotes).
If also want to include Bcc or Cc your just enter the .... & .... command for those as well. Make sure the commands are inserted flush against the the last entry as you can see in the code above.
Also depending on your email setup you can substitute your usual name before the @. For instance Feedback@access.net. Instead of TinaClarke which I usually use. This way you can channel emails for different aspects of your life. For instance you might want to use Newsgroups with NG Feedback so that you know for certain that is where your feedback is coming from. This can be used for any aspect of your web presence.
Tip 11 How to track your URL
http://accessfp.net/index.htm?1
By inserting the ?1 after the URL when you look at your stats you can determine how often this URL at the source you left it at is accessed. This is great for people in business who want to track how a particular promotion is doing. You can insert anything after the ? the URL takes you to the normal page, it just shows up in your stats enabling you to take count.
Tip 12 Breaking outta that frame-up
Stuck in another site's frames? Click here to break out! ....if you copy this code into your html view at the point you want it to be inserted you can help your visitors come unstuck they will thank you for it. Also see below for tip that applies to Tip 1 as well.
<a href="http://accessfp.net/" target="_top">Stuck in another site's frames? Click here to break out!</a>
Stuck in another site's frames? Click here to break out!
Further to this...'At times, site frames can be useful, but when they don't clear themselves from your browser when you click on "outside" links, they become annoying. So, next time this happens in IE4+, simply click (and hold) a link, then drag & drop it onto the address line of your browser. Voila -- no more frames! You may also drag & drop links into folders or onto your Desktop; it's a link's greatest adventure.'
(Tip found at Lockergnome)
Tip 13 Point the way
If you want to point to another page on your web you just enter the URL right?...E.G. if I want to go from wdt.htm to newbies2.htm I just enter newbies2.htm in the 'Edit Hyperlink box'. However if I wish to go to a certain point on the page at newbies2.htm this is what I do.
On the page named wdt.htm Enter text (for example) ...Images/graphics help:... at the point you wish to insert it. Then Highlight the text you just wrote and press bookmark and enter the text (for example) ...Web DesignTools... (this text is not the same as what you have just written so don't forget and just do it automatically you have to enter new text) which as you can see above was (for example) ...Web DesignTools...
Next go to Newbies2.htm and at the point you wish to insert the text enter ...Web DesignTools...Then Highlight the text you just wrote and press bookmark and enter the text (for example) ...Images/graphics help:...
Next highlight the text ...Web DesignTools... Click the 'Edit Hyperlink button' and enter into the 'URL box' ...wdt.htm#Images/graphics help:...
Next Go to Wdt.htm and highlight the text ...Images/graphics help:... Click the 'Edit Hyperlink button' and enter into the 'URL box' ...newbies2.htm#Web DesignTools...
Save both your pages and publish to the web. If you want to see this working in action first, then goto:
and
http://accessfp.net/newbies2.htm
Your visitors won't then have to search for what your referring to.
Tip 14 Index or not to index that is the question
If you have a page that you don't want to be indexed, use this tag:
<META NAME="ROBOTS" CONTENT="noindex,nofollow">
However, not all search engines support this tag.
Tip 15 Pop up a pop up
Want to open a pop up window when the page loads? Here is the code to do it.
<SCRIPT LANGUAGE="javascript">window.open('yourpage.htm', 'yourpage', config='height=50,width=50'</SCRIPT>
Tip 16 Click to Print
Would you like to have a clickable link that viewers could use to print your pages? If so insert the below code in-between your body tags.
<a href="#" onClick="window.print()">Print this page</a>