Prevent multiple form submits with jQuery in webkit/chrome

Blog

Okay, so, you don't want to submit a form twice. While there are server side ways to prevent a form from being accepted twice, it's nice to prevent the need with a little client-side prevention, too. Better user experience, as a bonus.

Using jQuery, you could do this:

  $(".class-on-my-submit-button").click(
    function(e) { 
        $(this).attr('disabled', 'disabled');
    }
    );

The problem with this is that the disabled attribute on the button prevents the form from submitting at all in webkit browsers: Chrome and Safari (ref: http://www.google.com/support/forum/p/Chrome/thread?tid=152f74d4890dc84f&hl=en)

Instead, add a class and check for the class' existence to determine if the form should submit or not.

$(".class-around-each-form form").submit(function(e) {
        if ($(this).hasClass('my-disabled-class')) { e.preventDefault(); return false; }
        $(this).addClass('my-disabled-class');
        return true;
        });

I have a div with a class named .class-around-each-form around each form on a particular page, a quirk specific to my set up. You could use $("form").submit(...) also.

Stupid simple and frustrating if you didn't realize its need, or didn't test on all the browsers.

How I made a TSA agent cry

Blog

Okay, so, here's my tweet:

The short version of what happened:

The TSA agent goosed me with her thumb during an opt-out search, I jumped, she told me not to move, I retorted that she was not allowed to touch me there, a supervisor came over, I explained what happened, he observed the remaining opt-out, I criticized the TSA agent's technique and told her what she did wrong, she apologized and gave a lame excuse, I gathered my stuff, she came back and apologized again in tears, I left.

And here's the long version of what happened:

This is unedited for typos or grammar. The words used are approximations of what was said, as best I could remember them. If you get the video of this incident, send it to me, I'd love to lipread the exact words and update the post to match.

This morning, Kris dropped me off at San Jose International Airport for my flight to Chicago via San Diego. Everything that could go wrong, had started going wrong, from arriving 30 minutes past when I wanted to arrive at the airport (as I had bags to check), the check-in kiosk not printing out my pass (ignoring that they take two minutes on a good day to print out a single pass in the first place), to another passenger shipping wine through the express bag check causing a block that forced all of us to check bags through the long, main check-in line, to the security line being far longer and far slower than I had seen it in years. Frustratingly, they had only one guy checking IDs and they closed the metal detectors.

When I moved near the front, but not at the front, of the baggage x-ray screening line, my stuff in bins, my shoes off, my sweatshirt off and all, I told the woman manning the entrance that I was opting out. I did this well before I pushed my bags through because last time I didn't, my bags were both away from me and out of my sight for 12 minutes, and when I complained last time, I was told to inform the TSA person I was opting out before I pushed them through. Fine. I said I was opting out, she told me to push my bags through anyway, then called for a female assist.

I mentioned to her (let's call her TSAF1) that she just told me to push my bags through, yet I was separated from them, and this made me uncomfortable. She moved over, and offered the spot she was standing in, in front of the metal detector, so that I could have a full view of my bags. I thanked her, as I appreciated the gesture. I watched my bags, as she called again for another female assist.

Eventually, another woman TSA agent, let's call her TSAF2, came over, and motioned for me. TSAF1 went to move the webbing barrier in front of the metal detector. "Why are you bringing her in that way?" TSAF2 asked. "Because she's right here." "But my station is over there," TSAF2 responded, almost pointing to the X-Ray machine I specifically said I wasn't going through. TSAF1 to her credit said, "Her bags are over here," stepped to the side and motioned me through the metal detector.

As I went to step through, TSAF2 told me to remove my sunglasses, which were on top of my head, and put them through the x-ray screening.

Now, first of all, they are plastic. They aren't going to set off the metal detector. Second of all, people are not asked to remove their prescription glasses when they go through the metal detector. In a huff, I stepped to the side to put my glasses in a dish, put it on the belt, then stood outside the detector.

TSAF2 motioned me to come through.

I stood where I was. "My items are out here. I'll wait until they go through."

I stood there. TSAF2 motioned me again.

Now, the problem was that the belt wasn't moving because my items were in bins at the other end of the screening belt. They couldn't put anything else through, until I grabbed my stuff, but I couldn't grab my stuff until I went through the metal detector, and I wasn't going through the metal detector until all of my belongings were into the x-ray machine.

So, I stood there.

And thought, great, this is going to be another problem, and my flight is boarding in less than 20 minutes. Just great.

Eventually the owners of the other items on the screening belt made it through the people x-ray machine, and picked up their bins, giving room. My stuff moved a bin down, and the screener fired up the baggage x-rays, and my glasses went through.

[TSA people reading this post, THERE IS NO SECURITY DIFFERENCE BETWEEN SUNGLASSES ON A HEAD AND PRESCIPTION GLASSES ON A FACE. Insisting the glasses go through the x-ray machine when the person is going through a metal detector only gives the agent a power trip and a reason to be rude to the passenger.]

I stepped through, and WHAT DO YOU KNOW, NO ALARMS.

As I walked towards my stuff, she blocked me and asked which bins were mine. Yes, I know the drill, I sighed and pointed out the three bins with my stuff in them. She wasn't particularly careful with my items, which frustrated me, but at least she didn't try to carry everything herself.

She then pointed me towards the right and said, "Go that way."

I took a step then stopped. "That way" is too vague. She wanted me to go to her search station, but didn't tell me which was hers. She said, "Go ahead," and I took two more steps, and stopped. She said, "Ma'am, you need to go that way," to which I responded, "If I don't know where I'm going, having me lead isn't going to work."

She clued in and pointed towards the third station away from where I had gone through the metal detector.

The other guy carrying my stuff put down two of the bins with my stuff, TSAF2 put the bins she was carrying down next to them, and asked me if I knew about the opt-out process. Yes, I said, I always opt-out, I knew what was going on. So, you know that I'm going to touch you, yes, yes, I know. I'm going to touch you with the back of my hand. Yeah yeah. I'm going to feel up your thighs, yeah yeah. Did I have any limitations, no, I didn't, I then said, Thank you for explaining all of thing, while thinking just hurry up already.

So, she had me stand facing the wall, feet wide, arms out to my sides, palms up to ceiling.

I find facing a wall with hundreds of people behind my back to be vunerable. I don't like it. I don't like it at all.

I also didn't like being told my palms HAD TO BE facing up to the ceiling.

WTF? Who cares which direction your hands are facing? What, if someone's hands are facing down, they aren't going to find the explosives strapped to their wrists?

COME ON!

[TSA people reading this post, THERE IS NO FUNCTIONAL DIFFERENCE BETWEEN PALMS UP OR PALMS DOWN. Insisting on palms up just gives the agent a power trip and a reason to be rude to the passenger.]

She rubbed my shoulders and my arms, then went down my sides under my arms. When she was done, I halfway dropped my arms. She told me to lift my arms again while she reached around my lower back. My arms were not in any position to block her access to the areas she was checking. I lifted my arms again, and dropped them halfway again when she was rubbing down my back. She asked me to lift them again, then explained that unless there is some physical limitation, the arms are supposed to remain up.

Now, there are competitions to see who can hold their arms out straight, though they usually have a beer stein at the end of them, in their hands. It's not a position I practice frequently. My arms were tired, so I dropped them halfway, bending my elbows.

[TSA people reading this post, THERE IS NO FUNCTIONAL DIFFERENCE BETWEEN ARMS AT 90˚ AND ARMS HELD AWAY FROM THE BODY WITH ELBOWS BENT. Insisting on arms locked out at 90˚ just gives the agent a power trip and a reason to be rude to the passenger.]

Seriously, if I'm going to call this much attention to myself, and opt-out in the first place, the chances I'm planning on doing anything are exactly zero.

So, the agent moved to my legs, telling me what she was going to do, asking me to spread my legs farther apart. Okay, fine, I was already in a vulnerable position, what's a little more? I spread 'em, and she started rubbing my right leg from knee to crotch. She stopped quickly, and asked me to remove everything from my pockets, so I pulled my passport out of my back right pocket.

I came back, stood again, and she started at the top of my legs, went down, came back up my inner right leg.

And....

She goosed me.

She stuck her thumb into my cunt and I fucking jumped.

"Ma'am, you are not allowed to move."

I turned on her on that, anger rising up. "No, you are NOT allowed to touch me there. You just touched my vagina and you are not. allowed. to. do. that."

Okay, yes, I freely admit that in my shock, embarrassment, frustration, worry and anger, I forgot what the hell my girl parts are called. You let me know if I I need to turn in my girl card, right after someone else shoves her thumb up your hooch in front of a hundred people.

She immediately said no, she hadn't done this. I repeated that yes, she had, and she is not allowed to do that. Recovering only a little bit, I said, "You touched my clit and that is not okay."

YES, I KNOW, ALSO THE WRONG WORD. It worked.

"Okay, I can get a supervisor over here."

"Yes, let's do that. Look, I'm not trying to be difficult, but you are not allowed to touch my clit. Yes, get supervisor over here."

We didn't wait very long.

He came over, and just as she started explaining what was happening, I interrupted. "Look, she was going the patdown, when she went up, she touched my clit. That's not allowed. When I jumped, she told me not to move. When I told her what she had done, she denied it then called you over. Look, I'm not trying to be difficult, I just don't want her touching me there."

YES, I KNOW, she touched my labia and vulva and whatever, but she also went up far enough to go into the vaginal opening. I wasn't thinking clearly, there was some penetration, and I wanted the most offensive word I could think of so that the guy would listen to me. Yes, I know, I know. Offering girl-card again...

The supervisor offered a private room. As I don't give a rat's ass who sees me in public, and that includes even if I were naked, I didn't want a private room. I do care when people try to cover up objectionable actions by hiding it from the people who would also be outraged IF ONLY THEY KNEW ABOUT IT. I want everyone to know what's going on and I want them to care about the retarded, stupid charade about security that is going on. I want them to stop being fucking sheep and demand some change. Fuck.

Right.

I said no, and went back to standing with my legs too far apart, arms not really at 90˚, facing the wall, waiting for her to try again. She asked the supervisor to move from where he could see what she was doing, around to the left side of me where he couldn't see what she was doing, and started the lower body patdown again.

This time, she kept her thumbs where they belonged and put proper pressure on my legs. She went up my right leg, and touched the top of my leg close to my inner thigh and not in the middle of my crotch. She did the same for my left leg, then came around to the front.

When she reached for my waistband, I lifted up my shirt, and she grabbed it and pulled it back down. "You don't need to lift your shirt when I check your waistband," she said, as she reached down the inside of my pants. I find this one just as stupid because if I'm carrying anything, she'll be able to feel it on the outside and not reach down into my pants.

TSAF2 then asked me to sit down in a chair while she repeated the rub down on the lower parts of my legs. She didn't look at or touch the bottom of my feet, so I have no idea why the second search on my lower legs.

[TSA people reading this post, THERE IS NO FUNCTIONAL NEED TO GROPE THE SAME SPOT MULTIPLE TIMES. If the techniques you use aren't finding issues the first time, doing it multiple times isn't going to help, figure out a better technique. Multiple gropings just waste time, and give the agent a power trip and a reason to be rude to the passenger.]

She stepped away and said she was going to test her gloves, holding them up and moving to the sensor to my left. I looked at her, then said, "Okay, look, I'm going to give you feedback about your technique. The second time you did it, you did it fine. You kept a firm pressure on my legs this time. The first time you didn't, and you jammed your thumb too high, touching me where you weren't supposed to. Be sure you keep pressure on the leg and your thumbs in and you won't have people mad at you."

She looked at me and said, "Oh, it was probably my gloves that did it. They are too big," holding up her gloved hands. I looked at her and the flimsy gloves on her hand, and said, "No, probably not."

The supervisor looking at her gave her the same expression I'm sure I had on my face, "No, and that's the stupidest excuse I've ever heard."

The sensor went off, and, of course, it was negative, so she said, "Okay, you're free to go."

I looked at her for a big longer, so she pointed to my stuff and said, "You can take your stuff."

I turned away from her at that point, to put my shoes on, when she approached me from behind and apologized. I turned slightly to look at her, and she continued, "I'm sorry. I didn't mean to. I really want everyone to have a good experience. I don't even like doing these pat-downs. I'm sorry."

I continued to gather my stuff, putting on my shoes, shoving my laptop into my bag, followed by my utilities box, and putting on my sweatshirt. I said something like, yeah, well, it's a sucky job, isn't it, but not quite those words, and turned my back on her to continue dressing. She moved away and I continued dressing.

Eventually I had my sweatshirt and shoes on, and everything packed back up: my phone in my pocket, along with my passport and my boarding pass. I slung my backpack around to my back, feeling slightly uncomfortable with just one bag since I normally carry two, and turned to walk out of the area.

As I turned, she approached me again. She reached out, but didn't touch me, and said again, "I'm sorry. I didn't mean to do that. I want people to have a good experience, you know. I'm sorry." She was crying, but not bawling, tears in her eyes. She was clearly upset, but, seriously, I didn't really care. She was the one who touched me inappropriately.

"Yeah, well, have a nice day," I said, and turned to leave. My thought as I pulled out my phone to tweet, however, was, "You shouldn't have apologized. It shows weakness."

While I regret that I didn't check for her nametag, and that of her supervisor, I suspect it wouldn't be hard to figure out who they are. I certainly fly Southwest enough that I suspect if she stays with the job, I'll see her again.

And if I do, I'll be sure to remind her to keep her thumbs in.

Of course, I'm also thinking of wearing just spandex shorts, a running bra and socks through the security farce next time, too.

Catharsis

Blog

My morning routine is fairly consistent these days: wake up, stumble to the bathroom, pee, wander to the kitchen, start the water for my tea, walk to where-ever I left my laptop, read twitter or close firefox tabs until the kettle sings, head back into the kitchen and dump four cups of water into my pyrex measuring cup with 2 teaspoons of tea, go back to my laptop, twitter or work for another ten minutes, meander back into the kitchen for my tea.

Yeah, there's a bit about that tea. It's always a variation of white tea both so that I minimize the caffeine intake and because I prefer the flavor. I'm not sure, though, that the morning ritual is more about the tea itself or the warm cup in my hands and the hot liquid going down my throat.

This morning, I was making tea, like most mornings, when I felt my necklace slide down my neck. It does this frequently enough, catching on the faint hairs on my neck before rolling down my neck a couple centimeters or so, that I don't think about it much.

This morning, however, it kept sliding. I thought this odd, so I reached up to figure out what was wrong with it.

And grabbed the bee walking on my neck.

There was the briefest of confusion, but when I realized what I had in my hand, I threw it.

Aaaaaaaand, then ran out of the kitchen screaming like a little girl.

My screams turned into sobs, which confused the hell out of Kris.

"Did you burn yourself?"

"No."

"Did you cut yourself?"

"No."

...

"I scared myself."

"Well, you scared me, too."

He then asked if there was a big bug for him to kill, because if I wasn't burnt and I wasn't cut, but I was screaming like a little girl, yeah, it had to be a big bug.

Yeah, a big bug. A big bug WALKING ON ME.

After my sobs subsided, I did what I usually do in cases like this.

I took a picture, then blogged about it.

Wondering if I should change the name of this blog to "My Catharsis."

Beehive Fisheye

Blog

Dashed outside today to try out the olloclip fisheye lens again. I may have to leave this thing permanently attached to the iphone, I like it that much.

Bonus with this picture? I wasn't stung.



Olloclip FTW

Blog

OMG. OMG. OMG.

I received the Kickstarter-backed olloclip today. The first thing I did, of course, was TRY IT OUT.

It took me longer to unwrap the clip from the packaging that it did to install it on my iphone. It consists of a mount and two lenses: a macro lens and a fisheye lens. Fortunately, the packaging came with instructions, too, so I knew what the heck I was doing:

I didn't figure out the wide angle lens, but the fisheye and macro, oh yes, I figured those out might quickly.

And had a great time with it.

Check out how coooooooooooooooooooooool the fisheye is! I totally had a grand time with this thing:

After having a great time with the fisheye lens, I switched to the macro lens. I'm a big fan of Canon point-and-shoot cameras because the macros on them are just so amazingly good. And, for the most part, I am okay with carrying a separate device just for the macros on it (okay, okay, I mean I'm good with carrying around TWO extra devices just for the macro shots I can take, because, yeah, I sometimes carry around two cameras in case one goes out, let that detail not come back to bite me some day).

The macros with the olloclip macro lens are pretty darn good:

I still prefer the Canon camera for macros, but if I have to go light (I'm still carrying something more than just the phone), it'll do.

For comparison, the same shots as the olloclip's pictures above, but with a Canon PowerShot SD1300 IS, my current camera:

Which is to say, I'll probably add this to my carry-all box, just for the fisheye lens. Can you imagine standing before a group of people just before giving a talk and taking a picture of them all with the fisheye camera? Wow, it'll be an awesome picture.

Pages