27+ Handy Javascript Techniques for Web Designer

post1
Javascript is such an useful script language. It is used in many web sites to add functionality, validate forms, randomize images, and much more. Although it is not required to be pro coder, there are some useful techniques every web designer should know. In this post you will find 27+ useful JavaScript techniques, scripts, method and object that will help you save time in your next project.

The content is focused on just good ol’ JavaScript rather then libraries. Nevertheless, there are some mentioned in the post. Insert them, use them and share.

1. Rollover Buttons with Preload Images

If you use CSS rollover buttons there might be a delay when use first mouse over the button.  Using the Following method you can create a simple rollover button.

javascript_rollover

 <a  href="webpage.html" onmouseover="roll('but1', 'image_rollover.jpg')" onmouseout="roll('but1', 'image.jpg ')"><br /><img src="image.jpg" width="64" height="64" border="0" alt="Rollover Button" name="but1" /></a>

2. Stylish Corner

If you want to add styled to box, footer using this jquery plugin you can create different kinds of Corner,

roundedcorner

View Demo

3. Box Shadow, Gradient Background

Using this method you can create box shadow, semi transpranent border, gradient background and much more.

border_shadow

View Demo

4. Tooltip

Create a simple tooltip for viewing information when user mouse hover links.

tooltip

View Demo

5.  Javascript Form Validation

In many project or client website you need implant forms. Using this script you can validate user information. You might also want look this this method here.

javascript_form

View Demo

6. Floating Layers

Need a floating div to show information, you can use this technique.

floating

View Demo

7. Disable Right-Click

If you want to disable user from right clicking so they can not copy your content then you can use this method. If you just want to simply disable

disbale_right_click

8. Create flickr like Image Protecting Method

If  the uploader does not allow you can not view the image in Flickr by “view background image”. Instead you see 1px transparent image. Using this technique you can create same script. This method will be helpful for a photographer portfolio or related websites.

$div style="position:absolute; top:10; left:10; width:400; height:75; z-index:1; padding:0px; border: #000000 1px solid; background-image:url(yourImage.ext);"#$/div# 

View Demo

9. Event Handlers (OnClick, OnBlur, OnFoucus)

JavaScript event handlers allows add  feedback, user interaction and more functionality in the web pages.

event_handler

10. Use of Alert, Confirm and Prompt

These three simple methods that comes in very handy for various purpose. This article explains how to use and insert them.

alert_prompt

11. BlendTrans Filter JavaScript/ Fade in Effect/ Hide Show

Create Fade in effect for image or button using this script .

fade_in

View Demo

12. Add Flash Like Preloader for Images

You have an image gallery that has lots of images. Why not use a JavaScript pre-loader so the user do not get bored. This technique can be viewed here in details.

loading

13. IE PNG FIX.

If are using PNG format images for you web sites, they will show up with a grey blck the background. Here are the five ways you can fix it using javascript.

png_fix

14. Page Sliders

Page Sliders are another cool way to build interactivity in your website. Here are some of best page sliders.

slider

15.  Add Twitter Status to your Website or Blog

Twitter is the new “hip” thing. Previously we explained how to add twitter status using PHP. Here is how you can emebed status in you site.

twitter_status

16. Create Drag and Drop Box

This post explains how to create to a box that can be dragged around the web page. You also should check out this altente method.
drag_drop

17.  Scroller/ News Ticker/ Text Scroller

This script shows how create different type of interactivity element such as slider, scroller, new  ticker  in your web pages.
scroller

View Demo

18. Random Images

The Rotate Images JavaScript swaps images automatically every time you reload the page.

random_images

View Demo

19. Continuous Horizontal Image Scroller

Have a gallery of scrolling images horizontally on your pages

h_scroller

20. Dynamic Text Gloss Effect

fancy_text

21. Add Glossy Effect to Your Images

This script allows you to add corners and shading and shadow to images on your webpage. Also check out Corner.js and Beval.js for more cool effects.

glossy

View demo

22. Feed to JavaScript

Run your own RSS feed using Javascript. Useful for people not running CMS or just don’t like popular feed providing services.

feed2js

23. Table Sorter

table_sort

View Demo

23. Stylesheet Switcher

Every wonder how certain website changes their color or  background when user clicks on  a images or link? Not to worry Using this technique you can easily have multiple stylesheet in you site.

stylesheet_switcher

View Demo

24. Page Redirection

If you recently changed your domain or you client and you need redirect the user, using this method you can redirect the user to new page.

<br />var sTargetURL = "redirectiontarget.htm";<br /><br />function doRedirect()<br />{<br />setTimeout( "window.location.href = sTargetURL", 2*1000 );</pre><br />}<br /><pre>

25. Twitter Like Parsing URLs with JavaScript

twitter_url

View Demo

26 . Collapsible DIV with Javascript and CSS

If you have content you want toggle only when user click on a link, using this method you can hide/show a CSS div.
div_slide

View Demo

27. Generate Random Numbers

Using the JavaScript math object you can create some handy scripts for generating different kinds of numbers.

random_number

You might also be interested in:

  1. 10 Smart Javascript Techniques to Improve Your UI
  2. Javascript Cheat Sheets & Quick Reference Guides for Javascript Webmasters, Coders, Web developers & Designers
  3. 10 Smart Javascript Techniques For Manipulating Content
  4. Seven JavaScript Techniques You Should Be Using Today

Have missed any cool techniques? Share it with use by comment.

If you enjoyed this post, get free updates by email or RSS.

Posted Under: Tips

Tagged: ,

  • Bookmark on Delicous
  • Share on Reddit
  • Share on Technorati
  • Share on Facebook
  • Share on Stumble Upon
  • Share on Stumble Upon

51 Responses to “27+ Handy Javascript Techniques for Web Designer”

  1. Politics says:

    Thanks for these techs and we will use these.

  2. Samir says:

    Thanks to post such useful scripts.

  3. WOW, you guys sure have awesome resources for web designers! Your website deserves all the accoilades it gets, the design community really loves your offering!

  4. Great stuff. You’ve covered all the basic bells and whistles a site would need, and you did it in a simple way so even newbies can spice up their website.

    Thanks.

  5. this technique is really good for rollover buttons.

  6. Excellent information! I ll try this out..Thanks

  7. petercc says:

    This is great tip but I think we need to mix with other methods also..
    petercc´s last blog : I Have Made A Web Page. Can You Direct Me To Upload It Without Any Change? Is There Any Free Web Hosting ?

  8. ks for sharing this list of techniques. Very helpful.

  9. Reiki says:

    Excellent information. Finding a few such solutions has taken hours in the past.

    Thank u.

  10. wow, these are soooooo useful scripts

    thanks for the list.

  11. You have a great blog here and it is Nice to read some well written posts that have some relevancy…keep up the good work ;)

  12. Phil says:

    A mixed bag here – the PNG fix is better served by the Twin Helix method as it fixes backgrounds too.

    Personally I always try to use jQuery for everything these days, it’s so quick and simple!

    Good post tho, keep them coming! :)

    Phil’s last blog post..Is mobile internet the way forward?

  13. web designer says:

    Thanks u r information

  14. newbie09 says:

    Good POST! This will help me do something with my design for tweetcustom.com I never learned graphic designing but I’m pretty clever with the photoshop editing. Learning colors & shading have been a wonderful experience!

  15. Art2code says:

    useful techniques !
    thanks a lot

  16. Kawsar Ali says:

    @Danh ba web 2.0: Thanks

  17. Useful list for me, thanks for sharing !

  18. john says:

    Holy crap, this guy doesn’t know anything. These are terrible.

  19. Kawsar Ali says:

    @Dannyprose: It is fixed. :)

  20. Dannyprose says:

    Doesn’t look like #12 (preloader) is linking to the right page.

  21. For #1, use CSS Sprites and you won’t get that flicker on rollover.

    Thanks for the list. :)

  22. nils.r says:

    Why use Javascript for what can be done with simple CSS? (#1)
    And disabling right-click is one of the nasties JS-Stuff around …

    apart from that nice list…

  23. Bzuk says:

    Nice list with all modern scripts.

  24. nice list of javascript techniques thanks ..

    joyoge designers’ bookmark’s last blog post..27+ Handy Javascript Techniques for Web Designer

  25. Design-notes says:

    nice list thanks for sharing

    Design-notes’s last blog post..Small web design elements tutorials collection

  26. mysticpixels says:

    The listed effects are worthy…but, adding JS codes into the html page or markups are highly discouraged. Unobtrusuve Javascripting should be used to add behaviours to the code. ie, there whould not be any JS code snippets embedded to the html tags like ‘onMOuseOver’ ‘onClick’ and all. This is a big no no, if we are following web standards.

  27. Adeline says:

    This is a good list! I haven’t used ‘Feed to JavaScript’ yet but will give it a go :)

Trackbacks/Pingbacks

  1. Web Design Articles, Inspiration and News - June 2009 - Creattica Daily
  2. Leer webdesign (800+ tutorials) | Edwin Duinkerken - Freelance webdeveloper en journalist
  3. Arbenting's Weekly Inspiration and Best of the Web #5 | Arbenting
  4. Enlaces semanales que no he publicado (18)
  5. 網站製作學習誌 » [Web] 連結分享
  6. WordPress and Blogging Articles for May 15 2009 | WPStart.org - WordPress themes, plugins and news
  7. The Technology Post for May 14th - Jason N. Gaylord's Blog
  8. links for 2009-05-12 | hooker headers
  9. Topics about Web-design | 27+ Handy Javascript Techniques for Web Designer | Desizn Tech
  10. links for 2009-05-12 | Eric Reboisson's Blog
  11. links for 2009-05-11 « Mandarine
  12. links for 2009-05-11 « riverrun meaghn beta
  13. pligg.com
  14. You are now listed on FAQPAL
  15. Twitted by jojototh
  16. 27+ Handy Javascript Techniques for Web Designers : Design Newz
  17. vot.eti.me
  18. 27 techniques Javascript pour designers | taggle.org
  19. CSS Brigit | 27+ Handy Javascript Techniques for Web Designer
  20. 27+ Handy Javascript Techniques for Web Designer « Internet Turnkey Websites
  21. 27+ Handy Javascript Techniques for Web Designer | Desizn Tech
  22. joyoge.com
  23. zabox.net

Leave a Reply

Premium webmaster graphics - Brushes, Vectors, Icons, PSD layouts
Hosted By
SecureSignup.net