background preloader

Css

Facebook Twitter

Form

Agency. The Basics of Object-Oriented JavaScript - Nettuts+ Over recent years, JavaScript has increasingly gained popularity, partly due to libraries that are developed to make JavaScript apps/effects easier to create for those who may not have fully grasped the core language yet. While in the past it was a common argument that JavaScript was a basic language and was very 'slap dash' with no real foundation; this is no longer the case, especially with the introduction of high scale web applications and 'adaptations' such as JSON (JavaScript Object Notation). JavaScript can have all that an Object-Orientated language has to offer, albeit with some extra effort outside of the scope of this article.

Congratulations, you just created an object. There are two ways to create a JavaScript object: they are 'Constructor functions' and 'Literal notation'. For each of the objects we have created a property 'iAm' which contains a string value that is used in our objects method 'whatAmI' which alerts a message. First we will create an Object literal; Conditional CSS. Blog Archive » Why Programmers Suck at C. If I had a dime for every time I heard a web programmer apologize for the way his/her pages looked before revealing them, I certainly wouldn’t need to work anymore. As with color picking, I think that programmers tend to avoid doing certain things not because they are inherently bad at it, but because they don’t know how to proceed. They find themselves in an uncharted and foggy territory, without a map, no sense of direction, and with a limited ability to know if they’re getting any closer to where they want to be.

Also, when they talk to people that don’t share such problems and find it all too natural and obvious, it’s hard for the two to communicate in terms that make sense to a programmer. There is a general tendency to believe that programmers can’t style things because they have no style themselves. Don’t get me wrong: I don’t think anybody can design something truly beautiful, innovative, simple and that can resonate with a big percentage of the population. Em vs. 35 Designers x 5 Questions. Advertisement 35 designers. 5 questions. 5 precise answers. Result: 175 professional suggestions, tips and ideas from some of the best web-developers all around the world.

In March we’ve selected over 35 prominent designers and design companies, contacted them and asked to answer five design-related questions, sharing their knowledge and experience with fellows developers. Here on Smashing Magazine. 35 Designers: how did we find them? Link How do you find the best designers worldwide? We didn’t choose by our intuition, we weren’t looking for any suggestions. We’ve browsed through numerous articles and hundreds of portfolios and in the end we’ve managed to select over 45 out of them.

Five Questions Link We’ve asked five questions. 1 aspect of design you give the highest priority to.1 most useful CSS-technique you use very often.1 font you use in your projects very often.1 design-related book you highly recommend to read.1 design magazine you read on a daily/weekly basis (online or offline). Control.Modal : Unobtrusive CSS Modal Windows and Lightboxes for. John Manoogian III » Blog Archive » (The Only) Ten Things To Kno. AKA, “Secrets of the patented JM3 Gasbag Model™” - a getting-started list to make sense of CSS. [2,547 diggs and counting.] The Point of CSS is to use clean, simple HTML in your page, then write CSS “rules” that style the objects on your page. The page stays clean and looks cool, and your HTML page works on both mobile devices and regular browsers.

That’s the point of CSS. But The Art of CSS is quickly and easily referring to the right objects in your page from your CSS rules. The act of matching CSS rules to HTML tags is like a conversation: both sides need to be clear and in sync with each other, or they’ll talk over each other and you’ll get a headache from all the yelling.General or Specific Matching: suppose you want to style an **<h1>** header in your page. You can choose how general or specific your style is applied: Gasface Corollary 1: the JM3 Gasbag Model only applies when using the default CSS rules of “relative” positioning. Hacks are stupid. WriteMaps: Create, edit, and share sitemaps online. Go2Web20.net - The complete Web 2.0 directory.

Most Inspired. Chris erwin dot com - CRIR: Checkbox Radio Input Replacement. CSS layout techniques. Javascript Sound Kit. CSS examples. Code | custom checkbox. This idea came about from AOL's use of image checkboxes in the recently launched version of their WebMail product as a means of selecting email messages rather than standard checkboxes. For those who are not AOL members, here are two screen shots of the interface. Both taken in MSIE, one with images enabled, the other with images disabled. (or "pictures" as they are called in the preferences): While their solution provides a uniform look across platforms (AOL is very interested in making sure things look "AOLish"), it doesn't do much for accessibility.

If images are disabled you've no way to know what the status of the checkbox is -- of course, if you cant even see the images you'll have no way of knowing what their status is either. This is an attempt to address these issues. How it Works The images you see above are inserted after each input element who's type attribute is "checkbox" for every form found in the document. HTML Source: Wufoo · Making forms easy + fast + fun. Articles » CSS » Fun with forms – customized input elements.

By Søren Madsen Ever wanted to match the look of your HTML forms with the rest of your website? This article demonstrates how to apply customized backgrounds to HTML forms, while preserving stucturally clean markup and accesibility. A few considerations before we begin Before you throw yourself at this, there are some important considerations you have be aware of.

Usability Users trust their credit card and personal information with forms on the internet, and that trust is sacred. So changing the appearance of well-known and recognizable browser elements like the basic input elements, may therefore not always be advisable. Differences in user agents The techniques we're about to demonstrate are not generic . Most popular browsers have however provided us with options to do so, but not all of them. So what are we left with? Logical restrictions With this technique, we basically hide the given form element, and replace it with graphic backgrounds. Some form basics – the and elements – the element. The Dynamic Duo - Checkboxes - The Checkbox Object. CheckBoxes - The Checkbox Object Similar to the Radio Object, the CheckBox object requires things to be set up in a particular manner. Again, to use this object you must have images for the two states of the checkbox: checkbox0.gif (false) checkbox1.gif (true) Which must be preloaded: preload('checkbox0','checkbox0.gif') preload('checkbox1','checkbox1.gif') This is the general format for the CheckBox Object: objectName = new CheckBox(layer,imgName,trueValue,falseValue,defaultToTrue) Where: layer - the layer the radio buttons are in imgName - the NAME in the IMG tag (see below) trueValue - the value when checked falseValue - the value when not checked defaultToTrue - (optional) use if the checkbox is initially true For my example, I have a checkbox for whether someone is a smoker or a non-smoker.

Smoker = new CheckBox('surveyDiv','smokerImg','smoker','non-smoker') The default value in that case is "non-smoker" (false). Smoker = new CheckBox('surveyDiv','smokerImg','smoker','non-smoker',true) Save DOM state using JSON. Brad Neuberg: Coding In Paradise: AJAX Tutorial: Saving Session. This is a mini-tutorial on saving state across page loads on the client side, without using cookies so as to save large amounts of data beyond cookies size limits. In AJAX, most of the action occurs inside a single web page.

When a page is loaded, a new instance of the JavaScript interpreter is started. When you leave a page, jumping to Google for example, all of your JavaScript objects are completely cleared away; you lose all of your state. If you then hit the back button to go back from Google to your original AJAX application, you will find that the page actually completely reloads, calling your onload listener, and that any JavaScript objects you stored anywhere are gone. This can be a pain. First, it's something that not all programmers are aware of, which can lead to errors, so it's important to know about.

Are there ways to save state on the client between page loads, akin to a user-level session? Method number one is to use an iframe in some special ways. Return doc; } Ntent with Style: Fixing the Back Button and Enabling Bookmarkin. Open Source Templates. Prototype Window Class : Introduction. Styling Checkbox and Radio Graphics With Only CSS. Web2logo.com. YvoSchaap.com. As everybody knows, refreshing pages is so 1999. AJAX, DOM, whatever you call it makes it possible to let people edit a piece of text inline without having to use a submit button. You say: but that ain’t new at all! I say: But all of this has been made easy to use and implement: 2.0!

Example page: inline edit (no JS knowledge needed) [source ] | Inline example: Please edit me! How you can make it work (5 easy steps for integration) Download this javascript file: InstantEdit 2.0 JSCreate a update file that handles the input. You’re done! How it works A small piece of javascript reads all SPAN tags, checks if it has class=“editText” and a id=. Compatibility This script works in Internet Explorer, Firefox, Chrome, Opera and Safari. Update hack If you want to force a textarea over a textfield (for example to edit a piece of HTML) use class=“editText” offsetHeight=“10”. If you want to PUSH an ID to your script I use: id=“edit_userID_$userID”. Protolize | Essential web tools in one place. RobaRate. CSS Star Rating Part Deux » Blog » Komodo Media. Typetester – Compare fonts for the screen.