Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Top 10 uses of Javascript?

Featured Replies

Hi folks,

 

I have just recently bought a book on Javascript as I understand it should be learned by anyone interested in web design. I roughly understand how the language works now, but wanted to know what can Javascript do for me? i.e what are the top 10 practical uses of Javascript in web design?

 

Thanks for your help :)

Here are some, not in order of importance:-

 

1. Dropdown menus (pure CSS can do these but generally CSS menus are hover-only while javascript menus can be click-and-hold or hover. Unusual CSS click menu here:- http://www.visibilityinherit.com/projects/popup-menu-demo4.php#submenu1 (no javascript needed for most browsers but IE needs ActiveX).

 

2. Image slide shows and other image effects http://www.hotscripts.com/category/javascript/scripts-programs/

 

3. Show/hide or Expand/collapse paragraphs http://javascript.internet.com/miscellaneous/expand-collapse-paragraph.html

 

4. Alternative stylesheets which need to "sniff" for different browsers or operating systems

http://www.alistapart.com/articles/alternate/

http://rafael.adm.br/css_browser_selector/

 

5. Chained select boxes http://www.dynamicdrive.com/dynamicindex16/chainedselects/index.htm

 

6. Image roll-overs (CSS can do these).

 

7. Rounded corners http://www.curvycorners.net/

 

8. Email scripts http://www.hotscripts.com/category/javascript/scripts-programs/email-scripts/

 

9. Popup windows http://javascript.internet.com/generators/popup-window.html

 

10. Time and date functions.

It's basically used to enhance the user's experience but should never be used as the only functional option. Everything you do in javascript should also be available in a non-javascript way.

 

One thing Wickham missed was client side form validation.

 

If you get in to server-side stuff javascript can be used with this too make a smoother ui.

  • Author

Thanks for these guys. This is a great help. If there are any more important ones please let me know. A top 10 may be too limited?

 

Thanks again!!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.