Let me check my calendar

OK, this is 2008. I know there are tons of hack web designers out there that bought a copy of dreamweaver but please give me a break. Hey, I’m not against hacks, I mean someone’s got to do pages for $10 or else the bait shop won’t ever get a web site. I just want to help you not look completely incompetent.

I have my speakers on because I sometimes like to listen to music when I’m working. A lot of other people do, too. When I go to a web page I. DO NOT. WANT. The accursed thing to scream at me or play me a flourish or orchestral hit. Sometimes I have my speakers on at night when others in the house are sleeping and that’s not only unprofessional, it’s just not courteous.

So please, since for some reason you refuse to do away with your stupid, worthless, out of date since 1997 splash pages at least get rid of the idiotic automatic sound. That is, of course, unless you enjoy being a laughing stock and enjoy your marvelous hit counter to remain at one visit (from your mother, she’s the only one that would bother to look).

I was going to post links to offending pages but the last 5 I ran across have been from the same “web design” company. 🙄

Third annual CSS Naked day

April 5th, 2008 is Bette Davis’ 100th birthday and it is also the third annual CSS Naked Day. If you are viewing this on April 5th then you will see no styling. Any other day it will look normal. A properly written web page should fail gracefully and still be useable by browsers that do not understand CSS. It is the web standards way. 🙂

The idea behind this event is to promote Web Standards. Plain and simple. This includes proper use of (x)html, semantic markup, a good hierarchy structure, and; well, a fun play on words. I mean, who doesn’t want to get naked?. Feel free to see the original reference article for more information.

Firing a click event using the enter key

This one had me stumped for a few minutes. I had a text box that would post to a google search. Entering text in and hitting the enter key would just post back to the page and have no effect.

Hmm. Frustrating. I don’t expect everyone to type in their search criteria and grab the mouse to click the tiny little button so here’s what you have to do.

                <asp:Panel ID="searchPanel" DefaultButton="topSearchButton" runat="server">
                <asp:TextBox ID="topSearch" columns="21" CssClass ="formbox" runat="server" EnableViewState="False" />
                <asp:ImageButton ID="topSearchButton" ImageURL="images/bg/buttonGoHome.gif" OnClick="topSearchButton_Click" CSSClass="buttonGoHome" AlternateText="Submit" runat="server" />  
                </asp:Panel>

OnClick event:

    protected void topSearchButton_Click(object sender, ImageClickEventArgs e)
    {       Response.Redirect("http://www.google.com/u/xxx?domains=www.xxx.edu&sitesearch=www.xxx.edu&q=" + topSearch.Text);
    }

The DefaultButton attribute names the ID of the button you want to fire. The only issue is it doesn’t work on a text box (or any other form item) it only works on a Panel. I suppose it makes sense because you usually don’t just have one form field and a button, it’s usually many text boxes, any of which can fire the click event using the enter key.

I figured there was no point in having ViewState on a text box that posts to another site so EnableViewState should be set to False in this case.

FPDF.asp carriage return / line feed in MultiCell

Recently I was given the task of printing address labels from a database using Avery 5160 labels. These labels are 3 columns of 10 rows. 2.625″ x 1″ (66.6mm x 25.4mm).

I was having trouble with carriage returns. First problem is that the ASP version of FPDF doesn’t seem to recognize the \n line feed. It was easy enough to replace it with Chr(10) but I suppose I had a misconception of how FPDF handles line feeds in that it used the entire height of the multicell height for every line of text.

At first I used this incorrect code to test (notice the carriage return has no effect):

<%@language=vbscript%>
<!--#include file="fpdf.asp"-->
<%
Dim i,pdf
Set pdf=CreateJsObject("FPDF")
     pdf.CreatePDF "P","cm","Letter"
     pdf.SetPath("fpdf/")
     pdf.SetTopMargin(1.27)
     pdf.SetLeftMargin(.42)
     pdf.SetRightMargin(.42)
     pdf.Open()
     pdf.AddPage()
     pdf.SetFont "Times","",9
for i=0 to 40
          labelText = "Client #" & i & Chr(13) & "<--carriage return there address" & Chr(10) & "City, State  Zip "
     pdf.MultiCell 6.66,2.54,labelText,1,L
Next
     pdf.Close()
     pdf.Output()
Set pdf = Nothing
%>

with the results shown below:
bad line feeds

Then after googling a bit I found a php version of a script for creating a PDF for Avery 5160 labels and ported it to ASP:

<%@language=vbscript%>
<!--#include file="fpdf.asp"-->
<%
Set pdf = CreateJsObject("FPDF")
	pdf.CreatePDF "P","mm","Letter"
	pdf.Open()
	pdf.AddPage()
	pdf.SetFont "Arial","B",10
	pdf.SetMargins 0,0
	pdf.SetAutoPageBreak(0)
x = 0
y = 0
' instead of for next call names and addresses from database
for a = 1 to 40
	' Make label text
	LabelText = "Contact Name" & a & chr(10) & "Entire Company Name" & a & chr(10) & "1313 Mockingbird Lane" & chr(10) & "Chicago, IL  60617"
	LeftMargin = 4.2
	TopMargin = 12.7
	LabelWidth = 66.6
	LabelHeight = 25.45
	' Create Co-Ords of Upper left of the Label
	AbsX = LeftMargin + ((LabelWidth + 4.22) * x)
	AbsY = TopMargin + (LabelHeight * y)
	pdf.SetXY AbsX+3,AbsY+3
	pdf.MultiCell LabelWidth-8,4.5,LabelText,0,L
	y=y+1
	if (y=10) then
		x=x+1
		y = 0
		if (x = 3) then
			x = 0
			y = 0
			pdf.AddPage()
		end if
	end if
next
	pdf.Output()
Set pdf = Nothing
%>

Just change the for-next loop to a database call and you’re in business.

I find FPDF extremely useful and am sure to use it in the future.

Making FTP work on Windows Vista

I just built a Windows machine from parts and installed Windows Vista Ultimate 64bit. The only problem I was having was the FTP service would not stay active upon shutdown or restart. I had to start it manually every time.

If anyone else is wondering, here is how to make it work (if you already have FTP installed and just need it to start on reboot then start at step 7):

  1. Control Panels
  2. Programs
  3. Turn Windows features on or off
  4. locate and check FTP Publishing Service
  5. Click OK to install the items you selected
  6. You may or may not have to start FTP through IIS 6 but it may work without this step
  7. Start Menu
  8. right-click “Computer”
  9. Select “Manage”
  10. Select “Services” under “Services and Applications”
  11. double-click “FTP Publishing Service”
  12. Change “Startup Type” to “Automatic”
  13. Click OK

Let me know if this helps. I don’t know, it may be obvious to everyone that knows Windows but I’ve been a Macintosh guy since I bought my second computer back in 1995 (I had a Texas Instruments TI-99/4A before that). I’m used to starting FTP with one click in the Sharing control panel. 😉

For comparison here’s how turn on FTP under Mac OS X:

  1. Apple Menu
  2. System Preferences…
  3. Sharing
  4. Click the “FTP Access” checkbox

This also opens the port in the firewall and keeps it active any time the Mac is started.

Second annual CSS Naked Day

April 5th, 2007 is the second annual CSS Naked Day. If you are viewing this on April 5th then you will see no styling. Any other day it will look normal. A properly written web page should fail gracefully and still be useable by browsers that do not understand CSS. It is the web standards way. 🙂

The idea behind this event is to promote Web Standards. Plain and simple. This includes proper use of (x)html, semantic markup, a good hierarchy structure, and; well, a fun play on words. I mean, who doesn’t want to get naked?. Feel free to see the original reference article for more information.

Bible verse tags 2.0

See here for more information on the new version of the Bible verse tags.

I hope that this plugin can be used to spread the good news throughout the earth.

Let me know if you need any help installing it.

John 3:16For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. - King James Version
1 John 11That which was from the beginning, that which we have heard, that which we have seen with our eyes, that which we beheld, and our hands handled, concerning the Word of life   2(and the life was manifested, and we have seen, and bear witness, and declare unto you the life, the eternal [life], which was with the Father, and was manifested unto us);   3that which we have seen and heard declare we unto you also, that ye also may have fellowship with us: yea, and our fellowship is with the Father, and with his Son Jesus Christ:   4and these things we write, that our joy may be made full.   5And this is the message which we have heard from him and announce unto you, that God is light, and in him is no darkness at all.   6If we say that we have fellowship with him and walk in the darkness, we lie, and do not the truth:   7but if we walk in the light, as he is in the light, we have fellowship one with another, and the blood of Jesus his Son cleanseth us from all sin.   8If we say that we have no sin, we deceive ourselves, and the truth is not in us.   9If we confess our sins, he is faithful and righteous to forgive us our sins, and to cleanse us from all unrighteousness.   10If we say that we have not sinned, we make him a liar, and his word is not in us.      - American Standard Version
1 Mosebog 3:12Adam svarede: "Kvinden, som du satte ved min Side, gav mig af Træet, og så spiste jeg." - Dansk bibel
Kolosser 3:1-31Seid ihr nun mit Christo auferstanden, so suchet, was droben ist, da Christus ist, sitzend zu der Rechten Gottes.   2Trachtet nach dem, was droben ist, nicht nach dem, was auf Erden ist.   3Denn ihr seid gestorben, und euer Leben ist verborgen mit Christo in Gott.    - Luther bibel

Trackbacked to:
Open Trackback @ Samantha Burns dot com
Cao’s Blog
Diane’s Stuff

Open trackback problems (sorry)

Thanks to Cao over at Cao’s blog for pointing out that the link to my open trackback post was broken.

I was wondering why I haven’t got any for a long time.

I’m going to have to ping everyone to let them know it’s back up and active.

Please accept my heartfelt apology. 🙂

Mark B.

Su. InMuscatine
Su. Onemanbandwidth
Su. The Blazer Blog
Su. Miceland
Su. Where are my socks?
Su. Peakah’s Provocations
Su. Otimaster
Su. Grandinite
Su. Free Constitution
Su. Conservative Culture (Su, T)
Su. – a metamorphoself
Su. The Amboy Times
Su. Stageleft
M. Courting Destiny (M, W)
M. Bloggin’ Outloud (M, F.)
M. The Land of Ozz
M. DragonLady’s World
M. Committees of Correspondence
M. The Tar Pit
M. Pirates! Man your Women!
M. WebKittyn Warbles
M. Forward Biased
M. Urban Paradise
M. Perri Nelson’s Website (M, W, F)
T. The Liberal Wrong Wing
T. Tor’s Rants
T. Those Bastards! (T, F.)
T. The Business of America is Business
T. RightPundits.com (T, F)
T. historymike’s musings
T. Common Folk Using Common Sense
T. Rightlinx
T. The Median Sib
T. The Path to Endarkenment
T. Stingray: a blog for salty Christians
T. Planck’s Constant
T. Renaissance Blogger (T, Th.)
T. Signaleer
W. third world county (W, F.)
W. Gribbit’s Word (W, S.)
W. Stop The ACLU (W, S.)
W. Diane’s Stuff
W. Stuck On Stupid
W. This May…Or Not
W. rashbre central
W. Cigar Intelligence Agency (W, Wknds)
W. Jack of All Trades
W. Right Truth
W. Chaotic Synaptic Activity
Th. Liberal Common Sense
Th. TMH’s Bacon Bits
Th. customerservant.com
Th. A Quiet Noise
Th. Mental Rhinorrhea
Th. Sed Vitae (Th, F)
Th. Republispin
Th. Diary of the Mad Pigeon
F. Pirate’s Cove (M, F)
F. Dan Mancini
F. MacBros’ Place
F. The World According To Carl
F. Gospel Fiction
F. Comedian Jenée: People are Idiots
F. Woman Honor Thyself
F. Publius Rendezvous (wknd)
F. Madman Returns
F. The Hill Chronicles
S. The Crazy Rants of Samantha Burns
S. Point Five
S. 7 Deadly Sins
S. Assorted Babble
S. Church and State
S. Selective Amnesia
S. Case Notes from the Artsy Asylum
S. Neocon Express
D. The Conservative Cat
D. Don Surber
D. The Dumb Ox
D. NIF
D. Right Wing Nation
D. Colbert Report
D. imagine kitty magazine
D. partyblog.ca
D. Robinik Open Blog
D. Culturetastic
D. Rightwing Guy
Wknd. Oblogatory Anecdotes
Wknd. Borknat
Wknd. Blue Star Chronicles
Wknd. The Right Nation
Wknd. Leaning Straight Up
Wknd. The Uncooperative Blogger
Wknd. Stuck On Stupid
Wknd. The Bullwinkle Blog
Wknd. 123beta (F, Wknd)
Wknd. Robinik.net
Wknd. The Clash of Civilizations (W, F, Wknd)

April 5th is CSS Naked Dayâ„¢

April 5th, 2006 is the first annual CSS Naked Day. If you are viewing this on April 5th then you will see no styling. Any other day it will look normal. A properly written web page should fail gracefully and still be useable by browsers that do not understand CSS. It is the web standards way. 🙂

Welcome to the first annual CSS naked day which will be happening April 5th, 2006. The idea behind this event is to promote Web Standards. Plain and simple. This includes proper use of (x)html, semantic markup, a good hierarchy structure, and; well, a fun play on words. I mean, who doesn’t want to get naked?. Feel free to see the original reference article for more information.

Please visit my friends at:
Third World County
Diane’s Stuff

Open Trackback Alliance

Please note: Imagine Kitty Magazine is changing direction and is no longer encouraging trackbacks of a political nature. Right wing or left wing, bashing or backing will most likely be denied. The line between the “right” and the “left” is so blurred that it all seems so pointless. You’re not going to change anyone’s mind anyway, so let’s give it a break.

Open Trackback Alliance

Please trackback to this this URL and link to this URL in your article and your trackback will show on the front page of this blog. For now the 10 most recent trackbacks will show but this may change in the future depending how many participate.

From the Open Trackback Alliance FAQ:

The entire concept is to encourage bloggers to showcase their best recent articles on other blogs which may not otherwise recognize or know about their works.

Open Trackback Alliance members have agreed to create an open article at least once a week, which anyone can create a link to their own blog articles…

So link up your best article. Let’s see what you’ve got. 🙂

Trackbacked to:
The Crazy Rants of Samantha Burns