scriptygoddess

Archive for the ‘Lessons learned’ Category

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 float) [...]

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 itself, and [...]

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 list [...]

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 = 0;
while ($i < 5) [...]

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 be [...]

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 I'm a [...]

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. She [...]

05 Oct, 2004

ASP: get the name of the current page

Posted by: Jennifer In: Lessons learned

(Side note: I hate ASP. I love PHP. But sometimes mean people make me use ASP) ;o)
I needed to get the current page name and redirect to a different page if it was a certain name. (ie. 1.asp or 2.asp or… up to any two-digit + .asp)
First – to get the page name I used [...]

30 Sep, 2004

OOP in JavaScript.

Posted by: Jennifer In: Lessons learned

Guest authored by
Sergey Zavadski – codethat.com


Featured Sponsors


  • cliff: hi wonder if you can help me, pls i designed www.kouga.mobi using dreamweaver CS3 and now want to make the phonenumbers into links so that if you
  • jerey: how do i rewrite this because it tried RewriteEngine on #Options +FollowSymlinks RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FIL
  • Jennifer: So I was testing this out to see if maybe something changed in the latest version - I had a test wordpress setup - and just dumped the mycomment funct

About


Advertisements