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.

Random Numbers & Letters

Featured Replies

I have been asked to develope an eye sight test for a driving school with jquery to randomly display a number plate on top of a background image, and have user interaction to input the displayed plate into a text box to confirm that they can read the plate.

 

I know very little much about jquery, and am only just getting my head around html5 and would appreciate any help that anyone could give.

This is just a partial answer/suggestion - and not jQuery, sorry! - but generating the random numbers/letters for the number plate and validating the user's typed in answer would easily be done with PHP.

 

You could have an array 0 to 35 and in it have values a, b, c, etc and 0, 1, 2, etc. Then use the rand() method to pick a random number which will correspond to a value in the array. Repeat for each letter of the number plate. Then use loops to check if the user has entered the correct value and it matches.

 

Perhaps this is possible with jQuery, i don't know much about that.

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.