scriptygoddess

Archive for the ‘Lessons learned’ Category

29 May, 2010

Test Credit Card Numbers

Posted by: Jennifer In: Lessons learned|shopping cart

When you are working with an online store, sometimes you need to enter a credit card number that will pass the "logic" of how the card number should be structured so that you can test the flow of your site. These card numbers are not valid for purchase, and if validated against a gateway – [...]

On a project I was working on recently, I was pulling in some css for iPhone users using PHP with the following code: <php if (strpos($_SERVER['HTTP_USER_AGENT'],"iPhone")) { ?> … CUSTOM CSS FOR IPHONE… <php } ?> This will also work for iPhones and iPod Touch: <php if (strstr($_SERVER['HTTP_USER_AGENT'],'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'],'iPod')) { ?> … CUSTOM CSS… [...]

Ran into a bizarre problem today using swfobject. A lot of wasted time, but I'll give you the short story / solution. I'm not sure of what other factors played a role (the fact that the element was in a absolute positioned container, or that the immediate container to the flash element was in a [...]

07 Mar, 2005

Image as buttons (and IE issues)

Posted by: Jennifer In: Lessons learned

Oh, this one was going to drive me NUTS! I had to use images as buttons in a form. That's easy enough: <input type="image" SRC="blahButton.gif" ALT="blah" name="blah" id="blah" value="blah" /> Which works fine when simply submitting the form when there's ONE button. But on one page I had TWO buttons. The form would submit to [...]

10 Nov, 2004

ASP: Look up / translation script

Posted by: Jennifer In: Bookmarks|Lessons learned

I should create a category called "saved my ass"! This script would fall under it. I was asked to create a "look up" tool that would sort of "translate" one piece of text to another. The user would enter in the first piece of text, and then they'd be given the "value". Oh, and this [...]

05 Nov, 2004

PHP: simple logic statement

Posted by: Jennifer In: Lessons learned

I'm tired of searching for the correct syntax everytime I wan to use this line… if you're doing a simple one line "if" statement, you can use a "ternary conditional operator" – for example: echo $variable == 'value' ? 'print if true' : 'print if false';

25 Oct, 2004

Continue vs. Break (in while loops)

Posted by: Jennifer In: Lessons learned

(note to self type post) Using "continue" in the middle of a while loop will skip the current iteration and go back to the beginning of the loop (checking the while value again). Using "break" in the middle of a while loop will break the loop entirely. (no more looping) So this code <?php $i [...]

25 Oct, 2004

Button Element

Posted by: Jennifer In: Bookmarks|Lessons learned

Hello, I'd like to take HTML 101. So I was working on a form. Used this method to create the form. Minimal HTML. Simple CSS. Started playing around with the :focus pseudo-class… and that's when I noticed my submit button started looking crummy. (From a usability perspective, I think there are some things that SHOULDN'T [...]

19 Oct, 2004

gifs that execute a php script

Posted by: Jennifer In: Lessons learned|Script snippet

Problem: (somewhat in line with my last post) I needed to run a script in the "background", but I only had the ability to present the script as a .gif. Solution: actually, I came up with two ways of doing this and both use .htaccess to pull it off. 1) I'm a gif but really [...]

09 Oct, 2004

Border tricks and centering issues

Posted by: Jennifer In: CSS|Lessons learned

I'm working on redesigning a site in CSS that I did many eons ago using tables for Christine. While I'm getting the hang of CSS, I still have a long ways to go. First of all – Christine wants a border around her photos: first a thick white one, then a one pixel black one. [...]


Featured Sponsors

About


Advertisements