Digg This Story
January 4th, 2008
I did some searching online for a quick and easy AJAX contact form… There isn’t one. The free ones are two years old and don’t work, and the other ones I saw cost money. So I fixed the problem.
Unzip to your directory, modify the two variables in “config.php” to your liking and voila.
Download (ver 1.01): whs_ajax_contact_form_1.01.zip
CHANGELOG:
1.01: Fixed a php tag.
View the form in action at http://www.whathuhstudios.com/contact.php.
More information for developers:
This is a pretty basic form that uses Scriptalicious (already included), and WForms (also already included). Scriptalicious is in there for some of the fancy dynamic effects. They aren’t over the top in any way, but just a little bit to class it up. The WForms has a validation routine that makes sure required fields are filled out. I left it in there so that you can ad fields to your liking. Just add the class = “required” tag to any fields that you want to make sure are filled out before submitting the form.
Credit for codebase:
http://www.jeffpipas.com/
Tags:ajax, design, downloads, php, tips
Leave Comment » | 149 views | Posted in design, development, php, web 2.0
Digg This Story
Digg This Story
December 31st, 2007
Most novice CSS users have never even heard of the “clear” property. I know in the past, I hadn’t, and racked my brain for hours trying to get my layout to display correctly with a floating sidebar. Here’s how it works:
When rendering divs, the browsers normal flow is to place one, then afterwards in the normal flow of things, place the next one. When you want to have divs side by side, the usual solution is to add the “float” property to them. In the case below, both the “left-nav” div and the “content” div have the property “float:left;”. We can then put content inside the floated divs, and have a happy layout. The problem is, there is nothing in the normal flow of things to continue the layout, so we need to tell the browser to push things down. Note these two examples:
Incorrect:
<div id="wrapper">
<div id="left-nav">
....
</div>
<div id="content">
....
</div>
</div>
<div id = "footer"><p>All of this text is hidden underneath the floated divs!!</div>
Correct:
<div id="wrapper">
<div id="left-nav">
....
</div>
<div id="content">
....
</div>
<div style="clear: both;"><!-- clear floats --></div>
</div>
<div id = "footer"><p>My footer now displays below the floated elements!!</div>
That one little line tells the browser to “keep going”, and moves the flow down. The easiest way to test this is to give “wrapper” a background color, and look at the difference in the two code pieces when there is content in each element.
HIGH TECH WEB 2.0 INTERACTIVE EXAMPLES:
Example 1 (Incorrect):
+--(#wrapper)---------------------------------+
| +-----------+ +--------------------+ |
+---| |----| |---+
| | | |
| | | |
| | | |
| | | |
| #left-nav | | #content |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
+-----------+ +--------------------+
Example 2 (Correct):
+--(#wrapper)---------------------------------+
| +-----------+ +--------------------+ |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | #left-nav | | #content | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| +-----------+ +--------------------+ |
| |
| +---clear: both-----------------------+ |
| |
+---------------------------------------------+
Tags:css, hacks, tips
Leave Comment » | 184 views | Posted in css, design
Digg This Story
Digg This Story
December 28th, 2007
Some people love dreamweaver. Some people hate it. I personally have found it to be greatly useful. I never leave the code view, as the design view is completely pointless, and almost never reflects what the page will actually look like.
Here’s one really neat thing you can do. There is a find and replace feature (CTRL-F) in dreamweaver that can take all files in your site, and replace one piece of text with another. This has many uses, but my favorite is this one:
Find in: Entire Current Local Site
Search: Source Code
Find: </body>
Replace: *analytics code* </body>

Click to enlarge thumbnail
You can add the code to hundreds of pages at once. All you have to do is a synchronize after that, and BAM, you’re done.The only caveat, is that if you don’t have the entire site on your local hard drive… well… you can’t do it. See the previous post for my rant on that, and how to get me to send you five bucks if you tell me how to do it.
Tags:google, tips, tracking
Leave Comment » | 46 views | Posted in development
Digg This Story
Digg This Story
December 28th, 2007
I’m having a small problem doing what I want, and the first person to figure it out gets 5 bucks paypal from me, instantly!
I have a website that I want to add google tracking code to, and Dreamweavers handy “find and replace in all files” feature can do just that for me… however, i don’t have all the files on my local hard drive. I want to download ONLY the htm, html, and php files from the site. I can “get” the entire site, no problem, but there is so much extra data, that I don’t feel like killing my internet connection for 3 hours downloading everything.
Anyone who can tell me how to just download all files of a type from a site, gets five bucks via paypal. Thank you in advance.
Tags:dreamweaver, ftp, rant
7 Comments » | 102 views | Posted in B2B, development
Digg This Story
Digg This Story
December 28th, 2007
Whathuh Studios has developed (read: thrown together) a new website. It is a background site, geared mainly towards MySpace users, but with photos that are quality enough for your desktop background as well. There are currently well over 1000 backgrounds, and by the end of the week there will be about 5000. All of the images are for PERSONAL USE ONLY and can NOT be used commercially in any way. It is temporarily located at http://www.whathuhstudios.com/myspace I will post the domain name once it’s up and running, but until then, feel free to use any of the backgrounds on the site.
Tags:myspace
Leave Comment » | 72 views | Posted in design, development, portfolio
Digg This Story