-
Filtering Adult Traffic For More Sales
When webmasters build sites there seems to be the train of thought that just because they use one of the top converting sponsors site they will make sales regardless of what type of traffic they are sending.
Unfortunately, this is often not true.
One of the first steps that we should take as webmasters when it comes to creating a new site, whether it be a free, avs or a TGP site is to learn the art of targeting our sponsors tour with the content and, more importantly, the traffic we are going to use.
taking it to the simplistic levels, a straight teen sponsors wont convert on a site that gets mostly mature traffic, the niches, although complementary, are so far apart its unrealistic.
That said, lets take a look at some options we can all implement on our sites to better target and filter our traffic to ensure optimum conversions.
One of the simplest ways to target and filter your traffic is to build yourself a hub or a surfer trap. Of course, we also have to take into consideration the type of traffic we are currently receiving to our site and, that we ‘could’ receive in the future.
Just because we receive 10,000 hits to our teen TGP doesn’t mean that ALL of that traffic IS looking for a teen site, this is where our surfer trap or hub site can come into play.
Even if your main focus is the teen niche, you should make sure that the first thing the surfer see’s when visiting any type of site you build is a multi-site FPA (Full Page Ad) where applicable.
This then starts your filtering process. If they know that they can find other niches than teen on your TGP then chances are, they will go to them either because that is what their niche is or, they are curious about that niche.
Another thing we can do as webmasters is to ensure we use the headers and footers of our pages in the proper fashion, offer our surfers a choice of the main niches, Asian, Gay, Ebony, Teen, Ect using only text links and, you will probably find that by lining these text links to your hub or surfer trap that you actually have a diverse range of traffic available to you.
In addition, rather than sending our surfers directly to our sponsors, send them via a filter page whether this is an FPA, or a page full of text links you made yourself detailing the benefits of the sponsor you are going to send them to, again, you will let the surfer know where they are going and, give them a choice as to whether they want to continue to that site or, choose an alternative.
Overall, webmasters who target their surfers by niche can, for the most part have some excellent sales with a variety of sponsors that otherwise they would not be able to see.
Target, Filter, Micro-Niche, however you do it, make sure your traffic is not wasted and, more importantly, make sure your sponsor is able to offer your surfer what you are telling them is inside the site.
Article written by Lee
-
Mirroring Adult Sites – Stage Three
So we hit stage three of our tutorial in this stage we are going to make some pages for our top 5 AVS systems. However, as we did in the last tutorial with the new TGP galleries we created we are going to use the same content and same pages that we have already built. On with the tutorial…
Anyone who build AVS sites will know that you need to have a standard site layout. This usually consists of an entry page (or a warning page), a navigational page (or in our case our menu.html page) and some gallery pages.
So the first thing we need to do is open up the warning page. Once this page has been opened we now need to do some editing of the page, what I would suggest is moving the warning text to the lower half of the page and at the top making some ‘juicy’ sales text, depending on the niche you are targeting with this site you may also like to add a couple of the original thumbnail images at the VERY top of your page however, these should NOT be linked to the full size image.
Once you have edited your page to a reasonable standard for the AVS you now need to save this page in the /FreeSite/AVS/ folder that you originally created on your HD. I would suggest saving the page as something like avs1.html or the name of the AVS you will be using this page for.
Once you have done this you now need to duplicate this page but save it as a different name in again, in the /FreeSite/AVS/ folder so you will end up with avs1.html, avs2.html, etc.
At the moment these AVS pages have no AVS script on them so, we need to visit the AVS system we are going to be using and fill out the details to have the AVS generate an AVS signup page script for us. Once we have the coding that the AVS provides we now have to place this on our avs1.html page. You should repeat this for each of the AVS’s you wish to use and save each instance of the generated AVS script to a separate AVS*.html page.
be aware, that when you are putting your information into the AVS to generate the script, you should enter the ‘members area url’ as the page we created for our navigation so, the AVS script location will be /FreeSite/AVS/avs1.html and, the members area page will be, /FreeSite/Menu/menu.html.
Once you have placed the script on our avs.html pages you should now have the following sites ready:
1) 50 Pic Free Site With Pics On HTML Pages.
2) 5 TGP Galleries With Pics On HTML Pages.
3) 5 AVS Entry Pages.Now we are starting to see how using one set of content can amount to a mass of sites all of which can be sending traffic to our sponsors and, to our surfer trap.
This is where stage three of our tutorial ends however, in our next tutorial we will continue to make some more sites and in an effort to get some traffic we start to play with the ones we have currently created.
Article written by Lee
-
Building A Surfer Trap – Stage 6
Stage 6 already!
Only 2 more stages to go after this tutorial until you have a fully functional surfer trap!
Ok as promised in the last tutorial, we are going to implement the table pages you hopefully made in our last tutorial.
You now need to signup for ANOTHER counter code. Use the same counter as you did last time and, again, make sure the URL you send the traffic from the counter to is your main Multi-Site FPA surfer trap page.
Ok, you have the new counter code, what you should do with this is place it on every one of the niche table pages we made yesterday. Nowhere else except on these pages.
Once you have the counter code placed you now need to go back to our consoles, what we are going to do is make these HTML table pages into a secondary console from off the first pop up that we get when a surfer visits any of our FPA’s.
What you should do is enter the following coding in between the <head> and </head> tags of the niche pop-ups ensuring that you choose a DIFFERENT niche to the one of your original consoles:
<!—— BEGIN CONSOLE CODE ——->
<SCRIPT language=Javascript>
<!–
var exit=true;
function exitcnsl()
{
if (exit)
open(“http://www.yourdomain.com/tableconsolepage.html”, “tables”,”toolbar=0,location=0,status=0,menubar=0, scrollbars=0,resizable=0, width=800,height=600,top=0,left=0″);
}
//–>
</SCRIPT>
<!—— END CONSOLE CODE ——->You need to edit the figures for width= and height= to reflect the size of your table, ideally the frame of the console should be around 3 or 4 pixels either side of your tables.
Ok now once you have added the above to your existing pop-ups you now need to add the following to the newly created table consoles between the <head> and the </head> tags:
<SCRIPT language=javascript>
self.blur();
</script>What this will do is once the first console loads, it will immediately load a second console but, this second console should be ‘hidden’ behind the main window that is displayed. We have created a blur console.
We now have one last thing to do with this ‘blur console’ that we have just created.
Go to the HTML coding for the table ad console and add the same JavaScript to that page however, this time you DO NOT need to use the self.blur section of the instructions or, change the sizes of the console that pops.
Instead you need to add the following to the <body> tag:
onUnload=”exitcnsl()” so as an example your body tag may look like this:
<BODY BGCOLOR=#000000 onUnload=”exitcnsl()”>
Now you also need to alter the location for the console that will pop this time, you have a choice, you can send the console directly to the ARS POTD program or, you can send it BACK to your Multi-Site FPA page, at which point the surfer will be able to select another niche or leave your site.
Now remember, this surfer trap IS aggressive however, every time one of your counter codes load both from the FPA’s where we implemented them AND on the newly created table consoles we are gaining extra traffic.
If you have ANY questions at all please do not hesitate to post on the forums and myself or one of our administrators will assist you.
Article written by Lee
-
European Surfers – Porn High On The List!
Adult web sites were visited by 3.8 million home Internet users in the UK in June 2001, according to Internet monitoring company Net Value. This accounts for more than a quarter of the entire UK home Internet population.
UK visitors to adult websites spent more than 45 minutes on these sites each in June. Adult sites make up 41.2 per cent of all the sites visited in the UK with a significant audience. Students (23.2 per cent), manual workers (15 per cent), and professionals (12.8 per cent) are the largest groups of UK visitors to adult sites.
However Germany has the largest audience for online porn in Europe with more than 5.3 million Germans visiting an adult site in June. They also spent more time on these type of sites than any other nationality – each German visitor spent almost an hour on adult sites in June. Net Value data also showed that more than half (52.3 per cent) the websites visited in June by a significant number of German users were of an adult orientated nature.
Spain has the greatest proportion of visitors to pornographic sites – 40 per cent of Spanish home Internet users visiting a pornography site in June 2001.
“Pornography has become a lucrative online business, with many companies now recognizing it as a valuable additional revenue stream,” Net Value’s Alki Manias said. “And this would seem to be a stable business area – the popularity of online pornography continues unchecked.”
Adult sites are also popular amongst the earliest adopters of the Internet. People who first got online at home before 1997 account for 18.5 per cent of visitors to adult sites, though they only make up 14.1 per cent of the whole UK online population.
In the UK, Lastminute.com has just introduced an auction for adult toys and aids, whilst in Germany, Freenet.de and T-Online are also moving into the adult business.
The following charts detail various demographics relating to European surfers usage of adult sites:


Number of adult websites visited, June 2001
Number of adult websites visited Total number of Websites visited* % of websites which have adult content Germany 4,140 7,909 52.3 Norway 3,847 7,756 49.6 Denmark 3,675 7,661 48.0 Italy 3,131 6,579 47.6 Sweden 2,419 5,231 46.2 Spain 3,069 7,019 43.7 UK 3,879 9,411 41.2 France 4,348 11,845 36.7 * Sites with a significant reach
UK visitors to adult websites by occupation, June 2001

As you can now see, we, as adult webmasters, have a considerable chunk of the online adult industry sitting in our laps and, we should concentrate on tapping into this market as more and more American companies are realizing the importance of these figures we will inevitably reach a stage where the European market will be passed across to our US counterparts.
-
Why Go Adult?
When choosing a hosting company why choose an adult host over a mainstream one?
Simple, They provide above other things, a better quality of service, affordability and, most importantly, reliability.
Adult hosts face a variety of technical and support issues, this coupled with the points mentioned above makes them a far superior choice to standard mainstream hosting providers. This is one of the main factors why more and more mainstream internet based companies are now turning to the adult business forum to provide their hosting solutions.
Mainstream going adult? Yes that’s right, more and more mainstream companies are turning to our industries hosting providers for the fast speeds, security and, reliable infrastructures they can offer after all, adult sites are amongst the most prolific on the internet on average gaining more daily hits to their sites than mainstream websites so, they need to be cost efficient, not only to the hosting companies but, also to their clients, the webmaster.
Our industry strives on the use of heavy graphics, coupled with streaming media files to secure sales and longevity, this is why the adult hosting companies need to be able to provide not just a single, heavily laden server but tens of them, sometimes even hundreds all producing gigabytes of traffic on a daily basis.
Adult hosting companies are constantly upgrading their equipment in order to improve not just their servers, connectivity but also the smaller things that are often overlooked by webmasters, hubs, routers, switches and the likes along side the not so technical aspects of running a host, The staff.
Along with all of this technical equipment they also need to maintain a high level of technical knowledge, after all, not just anyone can install operating systems capable of running multi-million dollar industries. They need the knowledge to maintain, upgrade, repair and sell their services to the best of their capabilities.
What does this mean to you? Well, we all want to make money and, through the use of faster servers, e-commerce solutions and the technical support your hosting provider can give you, you will be fattening your wallet on a daily, weekly, monthly basis.
Adult hosting, quite simply, is the crème de la crème of the hosting world, they offer solid, solutions whether you are starting in the adult industry or, operate a mainstream e-commerce site.
So how do you choose a host that is right for you?
You need to ask some basic questions of the host and, do your homework. Not only should you find out what hosting solutions they can offer you but, you need to find out what their support service is like, how affordable they are in comparison to other companies who can offer similar or the same service. Whilst on the subject of hosting support, before you sign on the dotted line, give your host a call out of office hours, if they answer, then you can almost be certain they are a good hosting provider.
Of course, not all hosts will have 24 hour phone support, however, that said, some offer 24 hour icq support, email support and more.
Another sure fire way to find out if a hosting company is any good is to ask on the heavily traveled webmaster message boards, after all, you are not the only webmaster out there who will have tried this company, if they are no good, someone will know about it and point you in the direction of a reputable host like http://www.webair.com.
Hopefully, this article will have given you some insight into the world of adult hosting companies and, will assist you in making the right choice of host for your site, whatever type of website you might be hosting.
Article Written By Lee
-
Search Engine Optimization, Is It Worth It?
One of the trendiest takes on Internet marketing these days seems to be the notion that securing top search engine rankings “no longer works.” Where it started, I have no idea.
But rarely does a week go by when I don’t see one or more Internet marketing “experts” claiming that search engine positioning is largely a waste of time and should not be a primary focus of Website owners.
Well, as the saying goes, “there are two sides to every story.”
But let’s not make this article about my side, or your side, or anyone else’s side. Let’s forget about my opinion and other “expert’s” opinions and stick to the indisputable facts, as reported by highly credible third party sources:
According to a Forrester Research Media Field Study, getting a loyal audience in the first place is best done by Search Engine Placement.
According to a GVU Users Survey, 84.8% of Internet users use Search Engines to find Websites.
In a study released by ActivMedia Research in September 1999, Search Engine Positioning was ranked as the #1 Website promotional method used by eCommerce sites.
And look what I just found in the April 2000 issue of Target Marketing Magazine.
“Top Ways Websites are Discovered”Banner ads: 1%
Targeted email: 1.2%
TV spots: 1.4%
“By accident”: 2.1%
Magazine ads: 4.4%
Word-of-mouth: 20%
Random Surfing: 20%
Search Engines: 46%
You’ve now seen the numbers and know that search engine promotion is very much alive and kicking. But let’s take this a step further. Let’s talk about the *quality* of prospects coming to your Website through search engines as opposed to other advertising mediums.
Every time your potential customers use the search engines, they qualify themselves as *hot prospects* by conducting searches on keywords that are directly related to your product or service. Their choice of keywords is proof that they have a genuine interest in what you offer. These people spend their valuable time exploring the search engines for your type of product or service.
Think About That.
They didn’t stumble upon one of your ads, or wander past a hyperlink to your site. And they didn’t get a banner ad thrown in their face. They made the *decision* to actively search the keywords that brought them to YOUR Website. And when they get there, they are ready and willing to do business with you. At the very least, they’re seriously considering it and, that’s the most powerful sales tool you can have!But merely getting your Website “indexed” or listed in the search engines is not enough. In order to get any significant traffic from the search engines, your Website must be listed within the top 30 search results (preferably the top 20).
Very rarely will anyone look beyond the first 30 results returned from a search. This makes perfect sense because the most relevant sites are always listed at the top. So if your prospect doesn’t find what they want within the first 20 to 30 listings, they’ll simply do a new search.
If your site falls anywhere below the 30th listing, you don’t stand a chance against anyone in the TOP-20. Hence, it should be your goal to achieve Top 20 positions.
How Do You Get Your Website Listed In The Top 20?
1) You can attempt to gain these Top 20 rankings yourself. However, this can easily become a full time job. (I think this is why so many marketers advise against focusing on search engine positioning.)2) You can hire a reputable company who can achieve AND maintain your Top 20 rankings for you (be sure they guarantee their service and have several verifiable clients that currently have multiple Top 20 rankings).
3) You can do nothing at all. But as you’ve seen from the third party statistics referenced above, search engine positioning is something you can’t afford to ignore.
Whatever choice you make, I hope that your eyes have been opened to the tremendous profit potential that exists with top search engine placement.
Article written by Lee
-
Records Keeping Compliance Checklist for European Content Providers
More and more European Content Producers are choosing to do business with American. webmasters. While citizens of foreign countries cannot be compelled to comply with United States’ restrictions on the creation of adult material, business realities are forcing foreign content producers to consider voluntary compliance. American webmasters, painfully cognizant of the increasing need to focus on legal compliance, consistently reject foreign content that is not produced in compliance with 18 U.S.C. §2257. Non-compliant content not only increases the risk that an underage model could slip through, but failure to strictly comply is itself a federal felony, exposing those involved to a 2-year prison term. Given the substantial compliance motivations involved, foreign content producers are expected to adopt the U.S. requirements as the global standard for creation of sexually explicit imagery. The following constitutes a bare minimum checklist for compliance with the requirements of Section 2257:
1) Assume that all erotic images require Section 2257 compliance: While the law only applies to actual “sexually explicit activity,” it is ill-advised for the content producer or the webmaster to attempt to guess which images require compliance, and which can be safely distributed without compliance. Since child pornography does not require the depiction of sexual activity to meet the federal definition, such distinctions can be risky business. And, in any event, a release given by a minor normally is not enforceable.
2) Obtain a signed compliance form created by a competent attorney: Section 2257 requires that certain records be created containing certain information. The right form is the best place to start.
3) Obtain, at a minimum, the following information from each model:
a. Date Of Birth
b. Legal Name
c. All other names, aliases, nick names, stage names, and maiden names
d. Social Security Number
e. Copy of Government-Issued Identification containing a picture; preferably 2 pieces of identification. Note the requirement that the producer actually examine the identification document, not just the copies.
f. Address, phone and other contact information
g. The model’s signature
4) Require the model to execute a binding model release prepared by a competent attorney. The images are only as legal as the model release backing them up. If all relevant rights have not been transferred and released by a valid model release, both the webmaster and the content producer are subject to claims once the content is displayed on a Web site.
5) Maintain the records so that they are cross-indexed by the models’ legal names and stage names and by web page. Alternatively, provide copies of all records to the webmaster if the webmaster will act as Records Custodian. You need to discuss the particulars of this with an attorney, because each circumstance may be unique.
6) The Records Custodian should maintain an off-site backup copy of the records: What happens if there is a fire or a government seizure?
7) Include a conspicuous records custodian disclosure on all CD’s / DVD’s containing erotic imagery, including the full legal name of the custodian and physical address where the records are kept. The disclosure should also certify that all models are over the age of 18, and include the date when the content was first created, published or republished. Placement of the disclosure on the product should be reviewed by an attorney.
Only through strict compliance with the mandates of Section 2257 will American webmasters fully embrace content produced overseas. The right compliance procedure will open profitable markets for foreign content producers, and result in a wider variety of adult content for both webmasters and consumers.
Article written by Lawrence Walters
-
Converting Japanese Traffic – The Niche Paysites That Work
Up to this point we have only looked at the European traffic sources and what niches convert for them however, we will now take a look at the Japanese specific adult surfers and, see just what makes them tick when they come to look online for porn.
Japanese Adult Traffic – Dispelling The Myths.
Contrary to popular beliefs Japanese porn surfers are not all looking for Bukakke or Hentai orientated adult sites in fact, the results we saw far from backed this up. Also, many webmasters believe Japanese traffic is worthless again, from our results this is simply not the case.Japanese Adult Traffic – The Niches.
We were extremely pleased with the results we found from the Japanese traffic we got to our hub sites in fact, we altered the type of sponsors we used on our Japanese hubs so that we could see just how well this type of international adult traffic converted and, i think you will see the results are worthy of you sending your Japanese adult traffic to sites that do not encompass dialers as the only means of revenue for those surfers after reading this article.Asian.
We set up a small niche specific ‘Asian’ hub trap that we could use to primarily filter our Japanese traffic through and, as we expected, very little of the traffic actually purchased memberships to these sites that were supposedly made specifically for Japanese surfers instead, all but 2 sales came from sites outside of this ‘Asian’ specific hub.Ebony.
By far our best converting niche on Japanese traffic, the sales figures we saw from a join perspective were enough to warrant that we altered the rest of our hub site to ensure maximum exposure of the Ebony niche sites we were using to get them in front of the Japanese surfer as quickly as possible.Anime / Hentai / Toon.
Again another surprise, the sales we saw on these niche paysites were lower overall when compared to sites in completely different niches what was also surprising about this is that the vast majority of adult webmasters will actively push their Japanese traffic to sites in this niche.Bukakke.
Finding a Japanese Bukakke sponsors was impossible for us, instead, we opted to send the traffic to a US only paysite and, as expected, we had no sales for this niche on the Japanese traffic we saw flowing through our sites. As mentioned above with the Anime niche, this is often the first type of site adult webmasters will send their Japanese speaking traffic too and, as we thought, this is wrong.Teen.
The teen niche converted really well for us, not as well as the ebony niche did but non the less, we received a steady amount of signups each month, this steady signup rate was also added to by recurring incomes from the previous months signups towards the end of our three month test period.Gay.
As with the Bukakke niche paysite we received absolutely no sales to the Japanese gay paysite we used in our hub site this was surprising as even with the other international traffic we had gotten at least one sale a month but, alas, it seems the vast majority of Japanese surfers do not want to see naked men online.Amateur.
Specifically amateur web cam sites converted for us on our Japanese traffic and again, this was good because of the rebills at the end of the month in fact, we still have some rebills continuing now some 5 months after our test period ended.Japanese Adult Surfers – An Overview.
As expected at the start of the test period, Japanese adult surfers are not primarily interested in Bukakke and Anime sites in fact, it would appear they were primarily interested in the Ebony paysites we had to offer them. This is interesting in itself because, when offered ‘Asian’ niche paysites we only achieved 2 sales a month compared to the vast amount of sales to the Ebony niche, I think it might be worthwhile re-visiting Japanese traffic at a later date so we can evaluate exactly what preferences they have over time.One other thing we discovered when testing the Japanese traffic was that, as we have been saying for a long time, Japanese surfers do hold credit / debit cards and, will use them online if their needs can be matched. This is good as if, like us, you use recurring sponsors on this type of traffic you will see some good long term residual income.
Article written by Lee
-
Mirroring Adult Sites – Stage Four
We are now going to take our basic template and start to make some pages for the link lists for this you will need to open up your original warning page. Once you have this page open you need to visit a couple of the link lists that you use. Go to the submissions page of the link list and download their reciprocal buttons.
In the same way that we did with the TGP pages we created you now need to edit the warning page you have open and insert the recip links on your warning page, ideally and, as most link lists will require this, the recip links should be placed above the enter and exit links.
Once you have done this, you now need to save your newly edited page as linklist1.html in the /FreeSite/LinkList/ folder, do this for as many of the link lists that you wish to submit to, each time saving the new page in the /FreeSite/LinkList/ folder.
Also at this stage, we should add a console to our link list page, ideally a blur console with links going to your surfer trap FPA’s. You can find the Java coding to create a blur console on the tutorial about building a surfer trap.
Once we have done this, we now have some more sites created. However, this time, the page/s we have just created are designed to build the traffic we have to our site/s.
Once you have these pages saved you now need to re-open your original warning page once more.
This time, we are going to optimize the page for the search engines, again, in the same way we added our ALT tags on the surfer trap we are going to add them to the warning page however, we are also going to optimize our keywords, description and, site title.
Once we have optimized our original warning page we should now save this as se1.html in the /FreeSite/Engine/ folder we created at the start of this tutorial. Once one SE page has been created, you need to create a selection of others making sure that you swap around the meta tags to ensure they are all different to each other, I would suggest making three variations of these SE pages each time saving them in the /FreeSite/Engine/ folder.
The next thing we are going to do is to ‘dirty’ these SE pages up some more, pretty much in the same manner as we did with the surfer trap tutorial. What we need to do is add a small pop up console to the three SE pages along with a blur console, these consoles can be the same ones that we used for our surfer trap or, we can create new ones however, I think the smart thing to do would be if we used the ones we currently have online. So once we have added these consoles we need to save the pages.
Also, to these SE pages we should add our Banner exchange code, as these will be going into the search engines there are no rules as to what we can and can not do on these SE pages so we should make sure that even if they just get one hit, we get additional traffic from them. By adding a banner exchange code as we did on the surfer tutorial we can drive additional traffic either to our sites or to our surfer trap, where you send this traffic is your choice. If you want to sign up for our new banner exchange you can find it at http://www.pornclient.com.
Now we have the completed site template built. We need to submit the pages and sites we have just completed to the TGP’s, AVS’s, Link Lists and, the Search Engines.
Once we have submitted these sites all that we need to do to create a new set of sites is to find another set of 50 images, rename the images as we did at the start of this tutorial, pic1.jpg, thumb1.jpg etc and simply upload the site to our server without the full size images and the thumbnails. Once the HTML pages are online, we now have to upload the full size images and the thumbnails and we have a set of sites using different content to our original one built in less than 5 minutes.
The best thing with these sites is that if a any time we want to alter the layout, all we need to do is edit the HTML of the version we have saved on our HD and we have a new template ready to use.
I hope you have found some use out of this tutorial and, I am sure you can think of other ways in which we can use templates of this style, this tutorial was just detailing some of the basics however, we can make the template as simple or as complicated as we like. Our only limits are what we make for ourselves.
Article written by Lee
-
JavaScript Know How
JavaScript can be one of the most useful additions to any web page. It comes packaged as standard in Microsoft’s Internet Explorer and, Netscape Navigator and allows webmasters to perform field validations, mouse-over’s, pop ups and a whole entourage of other nifty little features on our sites.
In this article we will show you how to:
– Display the browser name and version number
– Change the text in the status bar of the browser
– Use an input box to get text from the user
– Use a message box to display text to the user
– Change the title of the browser windowBefore that, however, we need to know how to setup our web page so that it can run the JavaScript. JavaScript code is inserted between opening and closing script tags: <script> and </script>, like this:
<script language=”JavaScript”>
–> JavaScript code goes here <–
</script>
These script tags can be placed anywhere on the page, however, it’s common practice to place them between the <head>and </head> tags. A basic HTML page that contains some JavaScript looks like this:
<html>
<head>
<title> My Test Page </title>
<script language=”JavaScript”>function testfunc()
{
var x = 1;
}</script>
</head>
<body>
<h1>Hello</h1>
</body>
</html>For the examples in this article, you should use the basic document format I have just shown you, inserting the JavaScript code between the <script> and </script>tags. When you load the page in your browser, the JavaScript code will be executed automatically.
Displaying the browsers name and version number.
The “navigator” object in JavaScript contains the details of the user’s browser, including its name and version number. They can be displayed in a browser using the document.write function:document.write(“Your browser is: ” + navigator.appName);
document.write(“<br>Its version is: ” + navigator.appVersion);I run Windows 2000 and Internet Explorer version 6, so the output from the code above looks like this in my browser window:
Your browser is: Microsoft Internet Explorer
Its version is: 4.0 (compatible; MSIE 6.0b; Windows NT 5.0)Changing the text in the status bar of the browser.
To change the text in the status bar of a browser window, just change the “status” member of the “window” object, which represents the entire browser window:window.status = “This is some text”;
Using an input box to get text from the user.
Just like in traditional windows applications, you can use an input box to get some text input from the user. The “prompt” function is all you need:var name = prompt(“What is your name?”);
document.write(“Hello ” + name);The prompt function accepts just one argument (the title of the input box), and returns the value entered into the text box. In the example above, you get the users name and store it in the “name” variable. You then use the “document.write” function to output their name into the browser window.
Using a message box to display text to the user.
You can display a message box containing an OK button. These are great when you want to let the user know what is happening during their time on a particular page. You can use a message box to display the “name” variable from our previous example:var name = prompt(“What is your name?”);
alert(“Your name is: ” + name);The “alert” function takes one argument, which is the text to display inside of the message box.
Changing the title of the browser window.
To change the title of a web browser’s window, simply modify the “document.title” variable, like this:document.title = “My new title”;
One bad thing about the “document.title” variable is that it can only be manipulated in Microsoft Internet Explorer. Netscape’s implementation of JavaScript doesn’t allow for modification.
In Closing.
As you can see from the examples in this article, JavaScript is a powerful scripting language that can be used to enhance a visitor’s experience with our site. However, you shouldn’t use JavaScript too much because in some cases it can annoy visitors and send them packing before your site even loads!Article Written By Lee
Premium Sponsors
Categories
- 2257
- Billing Solutions
- Blogging
- Branding
- Content
- Domain Names
- Employment
- Forms & Contracts
- General
- Hosting
- Link Lists
- Opt-in Mail
- Paid Traffic
- Pic Posts
- Promotion
- Scripts
- Search Engine Optimization
- Sponsors
- TGP
- Traffic
- Tutorials
- Viral Marketing
- WebDesign
- Writing