Skip to Main Content
MooTools 1.3 Cookbook
book

MooTools 1.3 Cookbook

by Jay L Johnston
July 2011
Intermediate to advanced content levelIntermediate to advanced
276 pages
5h 11m
English
Packt Publishing
Content preview from MooTools 1.3 Cookbook

Creating a group of elements that add their NAMEs and VALUEs as text in a DIV

Often in dynamic DOM manipulation of a web form, we must check the contents of the DOM using a live HTML debugger like Firefox's Firebug HTML Panel. This recipe is for those ready to have a quick look at a particular group of hidden elements. Get ready to turn on the light and watch the critters scatter; they're not so hidden anymore!

Getting ready

Start with a form that has hidden elements that we can mine for display.

<form id="myform" action="">
<input type="button" value="Show values"/>
<input type="hidden" name="h_1" value="Matthew"/>
<input type="hidden" name="h_2" value="Mark"/>
...

How to do it...

Grab the INPUT button that is within the form and attach a listener ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Jump Start Web Performance

Jump Start Web Performance

Craig Buckler

Publisher Resources

ISBN: 9781849515689Other