Answer Upon
#1 in Business Subscribe Email Print

You are here: Home > Internet and Businesses Online > Web Development > Add Dynamic Touches to your Website using JavaScript

Tags

  • income
  • directly
  • online
  • months names
  • appear enclose
  • youre wondering

  • Links

  • Visualization: How To Manifest Your Destiny
  • Nebraska's Heisman Hero
  • Performance Appraisals Must Go
  • Answer Upon - Add Dynamic Touches to your Website using JavaScript

    Website Ideas That Pay - Parked Domains
    Here's a great idea that gave me an additional 33 new income generating web sites. I, as well as many of my associates, have reserved many specific domain names for later use. Usually these domain names are parked at the domain name registrar or web host doing no harm or good ... except generating someone else income and not me! You should have this income, it's your domain right?Have you ever checked one of your own domain names to find it parked at the web hosts or registar's parked page? They are m
    o they don’t get displayed either, by changing ‘th’ to ‘’, ‘st’ to ‘’, ‘nd’ to ‘’ and ‘rd’ to ‘’. If you want to change how the date is displayed, to make it look like this, for example: Monday, 3 April 2006 , you need to move things around a little in the document.write line. This is how the document.write line should look to display the date in the format I just mentioned:

    document.write(weekDay+', '+day+' '+month+' '+year);

    You can notice we have removed the suffix part here.

    If you’re wondering why would you like to display today’s date in the page, the

    Tips on Changing Careers - Establishing a Workable Career Plan
    7 Steps to Help You Change Careers and Establish a Workable Career Plan If you are thinking of a career change or if you are trying to lay out a tangible career plan for yourself, there are several important things to consider.Step One – Self Assessment Self-Assessment is an important first step in considering where you are currently and discovering what direction you would like to go in the future. Some questions you might ask yourself include: What are my intere
    You’re not a programmer but you have a website. Would you like to add some JavaScript to it to make it look more dynamic and appealing? I have used JavaScript in many of the websites I have programmed, to do things that range from displaying today’s date to using Ajax. Of course I will not speak about Ajax in this article, Ajax would need an article on its own and is beyond the scope here. Just in case you’re wondering what Ajax is, it is a set of JavaScript instructions and classes that allow browsers to get information from a script in the server and update the page contents dynamically without having to reload the page. As I was saying, I will not discuss Ajax here. But I will share part of my knowledge and provide some ready-to-use code that you can easily add to your pages. The code pieces are independent, so you do not need to add them all. Each one works on its own. So let’s begin.

    In case you’re wondering if you need anything special to run JavaScript, the answer is no. You just need your browser. The only trick is to have JavaScript enabled in the browser, which is how most people have it set.

    I am not trying to teach you JavaScript here. I am just trying to provide you some snippets of code you can use directly of-the-shelf to enhance your pages.

    Display today’s date You can use this JavaScript small bit of code to display today’s date anywhere in the page. Just insert the code where you want the date to appear. Enclose all this code between script and /script tags.

     var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
     var months = new Array('January','February','March','April','May',

    'June','July','August','September','October','November','December'); var d = new Date(); var weekDay = days[d.getDay()]; var month = months[d.getMonth()]; var day = d.getDate(); var year = d.getYear(); var suffix = 'th'; if (day == 1) suffix = 'st'; else if (day == 2) suffix = 'nd'; else if (day == 3) suffix = 'rd'; document.write(weekDay+', '+month+' '+day+suffix+', '+year);

    This piece of code will display the date in this format: Monday, April 3rd, 2006 . If your site is in a language other than english, just replace the days and months names. You can replace the suffix letters so they don’t get displayed either, by changing ‘th’ to ‘’, ‘st’ to ‘’, ‘nd’ to ‘’ and ‘rd’ to ‘’. If you want to change how the date is displayed, to make it look like this, for example: Monday, 3 April 2006 , you need to move things around a little in the document.write line. This is how the document.write line should look to display the date in the format I just mentioned:

    document.write(weekDay+', '+day+' '+month+' '+year);

    You can notice we have removed the suffix part here.

    If you’re wondering why would you like to display today’s date in the page, the a

    Key Ingredients for Starting a Catering Business
    All of us dream about starting our own business. The kind of business we start should be compatible with our abilities and personality. If you have a passion for cooking, a head for planning and can keep your cool under pressure, consider starting a catering business.You don't need a big initial investment to start a catering business. You can keep your costs low at first by renting needed equipment. Most of your spending can wait until you get your first contract.Catering is not affected by downt
    s dynamically without having to reload the page. As I was saying, I will not discuss Ajax here. But I will share part of my knowledge and provide some ready-to-use code that you can easily add to your pages. The code pieces are independent, so you do not need to add them all. Each one works on its own. So let’s begin.

    In case you’re wondering if you need anything special to run JavaScript, the answer is no. You just need your browser. The only trick is to have JavaScript enabled in the browser, which is how most people have it set.

    I am not trying to teach you JavaScript here. I am just trying to provide you some snippets of code you can use directly of-the-shelf to enhance your pages.

    Display today’s date You can use this JavaScript small bit of code to display today’s date anywhere in the page. Just insert the code where you want the date to appear. Enclose all this code between script and /script tags.

     var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
     var months = new Array('January','February','March','April','May',

    'June','July','August','September','October','November','December'); var d = new Date(); var weekDay = days[d.getDay()]; var month = months[d.getMonth()]; var day = d.getDate(); var year = d.getYear(); var suffix = 'th'; if (day == 1) suffix = 'st'; else if (day == 2) suffix = 'nd'; else if (day == 3) suffix = 'rd'; document.write(weekDay+', '+month+' '+day+suffix+', '+year);

    This piece of code will display the date in this format: Monday, April 3rd, 2006 . If your site is in a language other than english, just replace the days and months names. You can replace the suffix letters so they don’t get displayed either, by changing ‘th’ to ‘’, ‘st’ to ‘’, ‘nd’ to ‘’ and ‘rd’ to ‘’. If you want to change how the date is displayed, to make it look like this, for example: Monday, 3 April 2006 , you need to move things around a little in the document.write line. This is how the document.write line should look to display the date in the format I just mentioned:

    document.write(weekDay+', '+day+' '+month+' '+year);

    You can notice we have removed the suffix part here.

    If you’re wondering why would you like to display today’s date in the page, the

    Do Not Try to Impress Those Around You When Selling on the Phone
    Have you noticed that often you might be sitting in a public place such as a coffee shop and someone else is on the phone and they are trying to use big words to impress everyone around them that is listening to them? Have you ever been on the phone with someone else and noticed that their conversation does not really relate to the subject at hand? It is obvious that they are trying to impress people that are around them while they're talking on the phone. This is really aggravating for people who they are t
    Script here. I am just trying to provide you some snippets of code you can use directly of-the-shelf to enhance your pages.

    Display today’s date You can use this JavaScript small bit of code to display today’s date anywhere in the page. Just insert the code where you want the date to appear. Enclose all this code between script and /script tags.

     var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
     var months = new Array('January','February','March','April','May',

    'June','July','August','September','October','November','December'); var d = new Date(); var weekDay = days[d.getDay()]; var month = months[d.getMonth()]; var day = d.getDate(); var year = d.getYear(); var suffix = 'th'; if (day == 1) suffix = 'st'; else if (day == 2) suffix = 'nd'; else if (day == 3) suffix = 'rd'; document.write(weekDay+', '+month+' '+day+suffix+', '+year);

    This piece of code will display the date in this format: Monday, April 3rd, 2006 . If your site is in a language other than english, just replace the days and months names. You can replace the suffix letters so they don’t get displayed either, by changing ‘th’ to ‘’, ‘st’ to ‘’, ‘nd’ to ‘’ and ‘rd’ to ‘’. If you want to change how the date is displayed, to make it look like this, for example: Monday, 3 April 2006 , you need to move things around a little in the document.write line. This is how the document.write line should look to display the date in the format I just mentioned:

    document.write(weekDay+', '+day+' '+month+' '+year);

    You can notice we have removed the suffix part here.

    If you’re wondering why would you like to display today’s date in the page, the

    Providing Excellent Customer Support on a Small Budget
    An integral part of any successful e-commerce website is an effective customer support solution. Your online business must be able to quickly respond to inquiries from potential clients and from existing clients, and then be able to address those inquiries accurately and efficiently.There is no other area of an e-commerce website that is as important as customer service and support. If your online business fails to address this one issue, your business is nearly doomed to failure.Sma
    ober','November','December'); var d = new Date(); var weekDay = days[d.getDay()]; var month = months[d.getMonth()]; var day = d.getDate(); var year = d.getYear(); var suffix = 'th'; if (day == 1) suffix = 'st'; else if (day == 2) suffix = 'nd'; else if (day == 3) suffix = 'rd'; document.write(weekDay+', '+month+' '+day+suffix+', '+year);

    This piece of code will display the date in this format: Monday, April 3rd, 2006 . If your site is in a language other than english, just replace the days and months names. You can replace the suffix letters so they don’t get displayed either, by changing ‘th’ to ‘’, ‘st’ to ‘’, ‘nd’ to ‘’ and ‘rd’ to ‘’. If you want to change how the date is displayed, to make it look like this, for example: Monday, 3 April 2006 , you need to move things around a little in the document.write line. This is how the document.write line should look to display the date in the format I just mentioned:

    document.write(weekDay+', '+day+' '+month+' '+year);

    You can notice we have removed the suffix part here.

    If you’re wondering why would you like to display today’s date in the page, the

    3 Ways to Get Interviewed in the Media
    Business ToolsAdmit it – seeing your competitor’s picture in a feature article in the newspaper or a trade publication gave you a flash of jealousy.You’re right to be envious – any prospective client for your services who reads that interview or feature automatically assumes your competitor is the leading expert in your field.When prospects and clients read about you in newspapers, magazines, or hear you on the radio or TV, you get official “third-party” credibility that draws prospects lik
    o they don’t get displayed either, by changing ‘th’ to ‘’, ‘st’ to ‘’, ‘nd’ to ‘’ and ‘rd’ to ‘’. If you want to change how the date is displayed, to make it look like this, for example: Monday, 3 April 2006 , you need to move things around a little in the document.write line. This is how the document.write line should look to display the date in the format I just mentioned:

    document.write(weekDay+', '+day+' '+month+' '+year);

    You can notice we have removed the suffix part here.

    If you’re wondering why would you like to display today’s date in the page, the answer I give you is: to provide your visitors the impression that your page is updated very often. That the page is up-to-date. Anyway, I think it is a nice touch.

    Display a message in the status bar You can use this small bit of JavaScript code to display a custom message in the browser’s status bar. Enclose all this code between script and /script tags.

     window.status = 'This is my message.';
     

    Paste this piece of code somewhere in the body of your page, and replace the This is my message text with the message you want to show.

    You can combine both pieces of code and display today’s date on the status bar if you wish. Just use the code piece to display the date, and replace

    document.write(weekDay+', '+month+' '+day+suffix+', '+year);

    with

    window.status = weekDay+', '+month+' '+day+suffix+', '+year;

    There is much more you can do with JavaScript to implement dynamic functionality in your page, including animation and menus. You will find scripts on the web you can use for free to implement these, or you can get someone to program the exact utility you need. In the meantime, I hope you enjoy these two snippets of code I provided today.

    HTTP = HTML link (for blogs, profiles,phorums):
    <a href="http://www.hubyou.info/article/87026/hubyou-Add-Dynamic-Touches-to-your-Website-using-JavaScript.html">Add Dynamic Touches to your Website using JavaScript</a>

    BB link (for phorums):
    [url=http://www.hubyou.info/article/87026/hubyou-Add-Dynamic-Touches-to-your-Website-using-JavaScript.html]Add Dynamic Touches to your Website using JavaScript[/url]

    Related Articles:

    Judgment Day: Assessing Your Service

    Public Relations in Lighting Businesses

    The Key to Creating a Successful Internet Business

    Bookmark it: del.icio.us digg.com reddit.com netvouz.com google.com yahoo.com technorati.com furl.net bloglines.com socialdust.com ma.gnolia.com newsvine.com slashdot.org simpy.com shadows.com blinklist.com