Archive for the ‘javascript’ Category

Accessing Window Parent elements with jQuery

How to access window parent elements with jQuery. $(window.parent.document.body).find(‘div.product’);

Prototype – jQuery serialize

if you changing javascript framework and jQuery serialize() method doesn’t work as good as you expected – like on prototype. user jQuery serializeArray() method. it equals to protype’s .serialize()

Javascript debug function

Some useful function for debugging javascript objects. function debug(o) { var s = null; for ( p in o ) s += p + ‘ – ‘ + o[p] + ‘\r\n’; alert(s); } Do you know better one, or updated version of this code? Please share it with all of Us.

Select text in the textbox

How to select text in the textbox with javascript? document.getElementById(“myTextBoxItem”).select(); Shorter way if you Using jQuery javascript framework: $(“myTextBoxItem”).select(); I am sure most of the people say, why do we need this functionality? Those who know, that this can save at least 2 clicks in the sequence performing some action(If u don’t understand read more [...]