Autofill Form Fields (JavaScript)

Leave a comment

INTRO

I am a developer and one of my main issue is fill all form fields of a form module. What a boring task!

REQUIREMENTS

jQuery.

INSTALL

Create a new bookmarklet into your browser bookmark toolbar.
Unwrap all the JavaScript code in a text editor (ie Notepad++).
Paste all the JavaScript code.
Use the bookmarklet into your page.

SCRIPT / SOURCE CODE

javascript:Filler();
function Filler() {
	function getRandomString(len) {
		/* Script by http://www.mediacollege.com/internet/javascript/number/random.html */
		var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
		var randomstring = '';
		for (var i=0; i<len; i++) {
			var rnum = Math.floor(Math.random() * chars.length);
			randomstring += chars.substring(rnum,rnum+1);
		}
		return randomstring;
	}
	$('form').each(function(i) {
		$('input[type=text]').each( function(i) {
			$(this).val( getRandomString(8) );
		} );
		$('input[type=checkbox]').each( function(i) {
			$(this).attr('checked', 'true');
		} );
	});
}

CREDITS
David Lomuscio, August 2011

Responsive Web Design

Leave a comment

Design “responsivi“:

Da sapere: il ViewPort nei CSS3

News di Oggi – 30/ago 2011

Leave a comment

  • HACKER – Il forum degli Sviluppatori di Nokia è stato compromesso da un gruppo di hacker (leggi news). Tips: la base dati delle login e delle credenziali di accesso ad un sistema web dovrebbe essere separato dalla base dati contenente dati sensibili degli utenti.
  • SEARCH ENGINE – Motore di Ricerca Open Source Yopp – testato il motore di ricerca con la ricerca della parola chiave “.NET” facente riferimento ad un linguaggio di programmazione.
    I risultati di ricerca non sono coerenti e sembra sia stata eseguita una ricerca testuale e non semantica. Sono stati quindi evidenziati vari domini internert contenenti la parola “.NET”. Nessun risultato che abbia a che fare con il linguaggio di programmazione.
  • TOOLS – Libreria per cifrare con chiave pubblica / privata in JavaScript.
  • TOOLS / EDITOR – Manuale sull’uso di Sublime Text 2.
  • MARKETING – Facebook ritira la sua sperimentazione Deals. Sembra quindi che non sia così semplice generare profitti da un Social che ha le sue peculiarità e le sue necessità: “Chi è il mio target? Con chi sto parlando? Dove voglio arrivare?“.

CodeIgniter – PHP “cannot send header” error

Leave a comment

This solution works for me:
- use Notepad++ (Windows) and open your source file.
- Change Encoding in ‘UTF8 without BOM’
- Save file and upload onto the webserver

You should have resolved the ‘headers’ error.

CSS – Border on Checkbox

Leave a comment

Use outline ( http://www.w3schools.com/cssref/pr_outline.asp ) property and not border property.

Border property works only on IE9.

Getting Started with “jQuery Validation”

Leave a comment

(1) When document is ready, manage a) rules and b) messages.

<script>
	$(document).ready(function() {

		$('#jobForm').validate({
			rules : {
				[..]
			},
			messages : {
				[..]
			}
		});
	});
</script>

(2) In your input field set a label with generated attribute.

<label for="firstnameText">Name (*)</label>
<label for="firstnameText" class="error" generated="true"></label>
<input type="text" name="firstnameText" id="firstnameText" value="" class="f_textinput" />

(3) Set rules and message to show.

<script>
	$(document).ready(function() {
		$('#jobForm').validate({

			// Rules
			rules : {
				firstnameText : "required"
			},

			// Messages
			messages : {
				firstnameText : "(specificare il nome)"
			}
		});
	});
</script>

NUI – Un esempio di Natural User Interface

Leave a comment

L’header animato sul sito della Cinergy simula una Natural User Interface (NUI).

Android – Favourites Apps

Leave a comment

  • Aldiko – book reader, from SD Card too
  • Opera Mini – only way to save offline web pages
  • Snapbucket – quickly modify photos
  • GPS Status
  • Web Sharing Lite
  • Spring Pad
  • Photoshop Express
  • Runtastic
  • Es File Explorer
  • Super Manager
  • Car Cast – to mandage podcast

Android – Horizontal Scroll

Leave a comment

Oggi ho notato il nuovo design del Market su Android 2.2 LG Optimus One P500.

La caratteristica principale è uno scroll orizzontale. Sembra quasi il Panorama di WP7.

Maggiori info su un articolo dal blog android.

Android + Google TV

Leave a comment

“..With the upcoming OS update to Honeycomb, Google TV devices will be Android compatible. That means developers can build great new Android apps for TV, optimize existing mobile or tablet apps for TV..”
from http://bit.ly/qm82pN

Follow

Get every new post delivered to your Inbox.