Category Archives: snippets

Send Authenticated POST Request with Zend_Http_Client

There is an easy way to send requests with Zend_Http_Client either in GET and POST. Actually you can request not only with GET and POST methods, but with any other http request method. $httpClient = new Zend_Http_Client(’http://….’); // request via … Continue reading

Posted in micro tutorial, PHP, snippets, web development, zend framework | Tagged , , , , , , , , , , | Leave a comment

jQuery: Get the Selected Option Text

What’s the Task? First of all let me explain what is the task. If there’s a select menu with several options, each of which are with a given value attribute, the task is to get the text into the option … Continue reading

Posted in javascript, micro tutorial, snippets | Tagged , , , , , , , , | 3 Comments

JavaScript Comparision Snippet

== vs. === I know this is really for beginners, but have you ever asked yourself what are the differences between == and === when comparing in JavaScript, and when to use it? Here’s an example: var a = false; … Continue reading

Posted in javascript, snippets | Tagged , , , | 2 Comments

jQuery cssText Helps You Improve Browser Reflows

cssText You know you can manage to redraw an element with single browser reflow. Instead of using .style.property … you can simply add all CSS properties you’d like to change with simply appending to style.cssText property. var csstxt = $(’#selector’).css(’cssText’) … Continue reading

Posted in javascript, snippets | Tagged , , , , | 2 Comments

JavaScript Zen

Is undefined equal to undefined? That’s the question! Crockford says it is not, but let see the experiment. var a, b; console.log(typeof a); console.log(a === b); the answer is – it is.

Posted in javascript, snippets | Tagged , , | 3 Comments