niedenzu

Hints and tricks for developers

Martins Amazon Wunschliste

PreparedStatementWrapper 23. April 2015

No Comments on PreparedStatementWrapper
Tags: ,
Categories: DB2 Java

highlight form elements with jquery



//highlight form elements....


document.styleSheets[0].insertRule("::-webkit-input-placeholder { color: green; font-weight: bold ;  background-color:rgba(255,255,255,1); border: 1px solid green}", 0);


$.each($("input"), function() {
	if ($(this).attr('name')) {
		$(this).val("");//evtl inhalte loeschen
		//if ($(this).attr('hasDatepicker')) {
			//wenn Datepicker, dann Felder vergroessern
			$(this).removeAttr("size");
			$(this).removeAttr("maxlength");
			
		//}
		$(this).attr("placeholder",$(this).attr('name'));			
	}

});


$.each($("select"), function() {
	if ($(this).attr('name')) {
		$(this).prepend("");
		$(this).css({ color : "green", fontWeight: "bold" }).val($(this).attr('name'));
		$(this).val($(this).attr('name'));
	}
});



$.each($("input[type=radio], input[type=file]"), function() {
	if ($(this).attr('name')) {
		$(this).before("
"+ $(this).attr('name') +"
"); } }); $.each($("input[type=hidden]"), function() { //nur elemente die ein name attrib haben.. if ($(this).attr('name')) { $(this).removeAttr("type"); $(this).before("
"+ $(this).attr('name') +"\n(hidden)
"); } });
No Comments on highlight form elements with jquery
Categories: Uncategorized
Martin Rocks