T-XU.COM      
Home |
  Home>Computer Programming>HTML>
Get More Out of Your Tabbed Browser
By Jon Schmedt        [Hits: 29921]





Being someone that spends most of the day on the internet, Ihave often looked for ways to simplify and speed up my dailytasks on the web.



A few years back, I luckily stumbled onto the Mozilla browser.Needless to say, I am now totally hooked on the tabbed browsingfeatures.



Background:



For those who are unsure about what tab browsing is, a tabbedbrowser allows you to open a new web page without having to opena new browser window. So, multiple web pages can be loaded inthe same window making it easy to switch between different sitesyou find on the internet. When you're done surfing the web, youonly have to close one browser window even though you areviewing multiple web sites.



Requirements:



This article will be most useful for those using the MozillaFirefox browser. You can also benefit from it using InternetExplorer, but since I.E. doesn't support tabbed browsing yet,you will end up with multiple windows open on your desktop. Ifyou have not yet tried Firefox, I highly recommend it regardlessof whether or not you plan on reading this article. It's freeand can be downloaded at http://www.mozilla.org



Let's Get Started:



In this article, I will explain how you can unlock additionaltabbed browsing features built in the Firefox browser. Then, wewill learn how to open multiple web sites with one click throughthe use of JavaScript. Finally, we will create your ownpersonalized home page that provides quick access to yourfavorite sites.



STEP 1: Unlocking additional Tabbed browser features inFirefox



One difference I noticed between the current Firefox version andprevious Mozilla releases is that by default, Firefox does notprovide an option to make all external links on a web page openin a new tab versus a new window. After reading more at theMozilla site, I found out that this option is available, butjust needs to be unlocked. There are a couple of ways to unlockthis feature. But, I find the quickest way is to do thefollowing.



- With the Firefox browser window open, type (about:config)without the parenthesis in the address line where you wouldnormally type a URL. This will list the main configurationparameters for the Firefox browser with their current values.Cool huh..?



- Scroll down the Preference Name list until you seebrowser.link.open_newwindow. Double click on this line.Change the Value listed in the text box from 2 to 3.



Now, whenever a link on a web page attempts to open a newwindow, the site will load in a new tab instead. Now it's timeto take advantage of this feature. In the next step, you willlearn how to open all of your frequently visited sites in onebrowser window with one click.



Note: You can also unlock this feature by creating a user.js file that will store additionalconfiguration parameters.



More information on how to do this and additional tricks isavailable at http://www.mozilla.org/support/firefox/tips#beh_reuse



STEP TWO: Load Multiple Sites in Tabs UsingJavaScript



Now that the browser settings are set to load all external linksin tabs, we will begin creating a personal home page that willtake advantage of this feature. To do this, we'll create a basicweb page in html that will call on the use of a simpleJavaScript. To start, create a new .txt file in Notepad.



If you are new to html programming for the web, don't worry. Youcan copy and paste the code examples below if you like. The pagewon't look fancy, but you can improve on it in your spare time.I've also created a code generator form to help with thisarticle at http://www.4allgood.com/?mod=26 It will create all the necessary html codefor you to view, customize, and use.



One neat feature JavaScript provides is the ability to openwindows on the computer. Using JavaScript, we can open multiplesites with a single click. In this example, I will load some websites that I frequent. On your page, just replace the links withyour favorite sites, or use the code generatorform to make your own links.



HTML/JAVASCRIPT CODE EXAMPLE:



<html>

<head>

<title>Personal Home Page for Firefox </title>

<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">

<script>

var Engines = new Array (

"http://www.google.com",

"http://www.yahoo.com",

"http://www.ask.com"

);

var Classifieds = new Array (

"http://www.4allgood.com/adlandpro.php",

"http://www.4allgood.com/classifieds",

"http://www.4allgood.com/freeadposting.php"

);

var Finance= new Array (

"http://finance.yahoo.com",

"http://www.forbes.com",

"http://www.sharebuilder.com"

); function openPage (favorites)

{

for (i = 0; i < favorites.length; ++i)

open (favorites[i]);

}

</script>

</head>

<body>

<h1>A Sample Home Page for FireFox</h1>

<p><a href="#" onClick="openPage(Engines); returnfalse;">Search Engines</a></p>

<p><a href="#" onClick="openPage(Finance); returnfalse;">Financial News</a></p>

<p><a href="#" onClick="openPage(Classifieds); returnfalse;">Online Classifieds</a></p> </body>

</html>



CODE EXPLAINED:



Using javascript, the links to each of your favorite sites canbe listed in an array. Then, using the openPage function, we canopen all sites in the array whenever a link is clicked. This isdone by running the function as the onClick event occurs. Thevariable names can be anything you like. (ex. var Whatever = newArray) In the sample, I gave the variables a name according tothe type of sites listed in the array.



The openPage function will find and load all of your favoritesites listed in the arrays. To call on the function, just enterthe function name followed by the variable name. Ex.)openPage(Classifieds);



Once you have copied and pasted the above code, or the codeissued by the generator form into NotePad, save the file asfavorites.html.



STEP 3: Putting it all together into One Time SavingFeature



If you have followed steps one and two, you should now have apage that will allow you to open multiple sites in tabs with oneclick. You can easily add additional arrays, or edit the linkscontained in the arrays to include all of your most frequentlyvisited spots on the web.



To get the best use out of your new favorites.html page, you canset it to be your home page. This way every time you open thebrowser, all of your favorite sites can be loaded quickly.



Here's how to set the home page in Firefox.



- With the favorites.html page open in your browser, click onTools -> Options.



- Now, click the "General Options" icon located in the upperleft corner of the Window



- In the Home Page Option section, click on the "Use CurrentPages" button.



You now have your own home page with your favorite sites justone click away. I hope you found this to be as fun as I did tocreate. If you have any questions, or add-ons for this article,please feel free to contact me at my web site.


  Top Articles
*HTML for Complete Beginners
*Anim-FX Launches Special Chris
*Can a Webpage be Created Witho
*Don't throw away your leads
*Wallpapering for Home Improvem
*HTML : A way to make your site
*The Three Principles of HTML C
*Learning Guide
*HTML: A Beginners Guide
*HTML Tips : Easy Ways to Make
  Related Articles
*HTML Tips : Easy Ways to Make
*HTML : A way to make your site
*Anim-FX Launches Special Chris
*Don't throw away your leads
*Can a Webpage be Created Witho
*HTML for Complete Beginners
*The Three Principles of HTML C
*Learning Guide
*Wallpapering for Home Improvem
*HTML: A Beginners Guide


Prev: HTML Tips : Easy Ways to Make Your Website Sizzle   Next: How to Tell if "Business Opportunities-- Free Website Provided" Is Legitimate



Home | Site Map | Bookmark this site | T-XU RSS
Copyright 2007 T-XU.com - All Rights Reserved Worldwide.