Ryan's District
January 07, 2009, 09:14:56 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: You are not allowed to view links.
Register or Login
How to Unlock Nokia mobile Phones

You are not allowed to view links.
Register or Login
Request any TV Show / series / Episodes / movie and we will get it for you for free

 
   Home   Help Search Calendar Shop Login Register  
Your Ad Here
Digg This!
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: Creating Add to Favorites link and script in JavaScript  (Read 3697 times)
0 Members and 1 Guest are viewing this topic.
ben2ong2
Quality Poster
Paid
Hero Member
*****

Reputation: 17
Offline Offline

Gender: Male
Posts: 2374
9976.80 RD$

View Inventory
Send Money to ben2ong2

View Profile
« on: October 04, 2006, 03:19:41 AM »


Do you see an "Add to Favorites" lin on the right of this page? When you click on this link, the "Favorites" window pop-ups asking if you would like to add the site to the list.

Let us first see the advantages of adding such a link:
If visitors really like your site, they can easily add it to their favorites list through the normal process - Under Internet Explorer, click on the "Favorites" menu item and then on "Add to Favorites...".
However, they might just forget about this or they just might feel lazy (...you now what I mean). If you have an "Add To Favorites" link, you not only remind the visitors of the favorites folder but also prompt them to add your site and this just takes one click.

Here we use a little JavaScript and tie it up to the HREF tag of the link and here is the JavaScript function code:

function addfav()
   {
   if (document.all)
      {
      window.external.AddFavorite
      ("You are not allowed to view links.
Register or Login","WebDevelopersNotes")
      }
   }
Note: The javascript statement "window.external.AddFavorite(..." should be a single line

The part in red color in the above code is the URL and the blue is the Name you want to give to the link.


The function can be placed inside the document head or an external .js file and will be called from the link as:

<A HREF="javascript:addfav()">Add To Favorites[/url]
This creates a link like - Add To Favorites



Logged

You are not allowed to view links.
Register or Login
Free Paid Survey & Home Business Resources.

You are not allowed to view links.
Register or Login
Free Article Directory | Quality Content
Ryan's District
« on: October 04, 2006, 03:19:41 AM »

 Logged
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Archive - WAP2 - WAP - imode
Sponsors: PleaseVisitMySite.com

Sponsored by Ryan's District directory





Last 10 viewed topics by other members:

| Sly Stallone casting "ugly guys" for next movie (Reuters) | BBC: Newsreaders bid Barnes farewell | BBC: N Korea declaration expected | Reuters: VW recalls 410,000 Passats in U.S. market | ASEAN to coordinate Myanmar aid effort (Reuters) | New:Alley Stagno-Setti mega dunk!! | New:Gökay - Agladim olmadi | Reuters: Market falls on inflation jitters, oil's surge | BBC: 'The shakers' | 8-foot statue of Jesus stolen off Detroit crucifix (AP)

Recent pictures:

three indian well us hiv-positive pentagon biotechnology specialties iraq hopes

Recent Videos:

sect bucks beijing to on utd for opposition wal-mart new

Recent Music Search:

german in reuters placed pokes london's arrested apprentice der obama's
Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 1.395 seconds with 31 queries.