Open a Window

For the Engineers Association website, people submit newsletters to me as Word or PDF documents and ask me to post them to the website. I thought it would be good to have those open in a separate window since they are not html documents. I searched for the tag that would do that, but quickly found that it requires javascript. Also I found a site that said opening new windows was one of the top ten bad things that web designers can do because if the user wants to open a new window they can do it themselves and opening a new window messes up the Back button since you can’t go back from a new window (you have to close the window).

The function I needed was window.open. I found a function that would do it and then you would call the function (in fact I used that when I made the covered bridge navigator), but I wanted it to all be in the link without a separate function call. By searching for “window.open” and “href” I found the exact same guy’s web page, written 4 years after his original warning to avoid opening a window, saying that for non-web documents it was best to open a new window because when people open a .pdf document they usually close the window to get rid of it and then lose their place and have to start the browser from scratch again (which is exactly what I always do). However he did not provide any code on how to do this. I soon found a really good way to do it by using the HREF to go to the .pdf file, but adding an onClick that would cause a new window to open. Then you have the best of both worlds: when someone mouses over the link they see where they are going, they can even download the file by right-clicking it, and the link still works even if they’ve turned javascript off. But if they have javascript running, it will open a new window when they click it.

The code below opens a new resizable window 700 pixels wide (enough for letter size width) by 500 pixels vertical, without toolbars:

<a href=”newsatl06.pdf” onClick=”window.open(‘newsatl06.pdf’,’mywin’,’left=20,top=20,width=700,height=500,toolbar=0,resizable=1′); return false”>February 2006 Newsletter</a>

You can also see it in action

Out Clicks

The counter I use on my website added a new feature today (at least I just noticed it today) called “out clicks”. Site Meter has always been great because it tells me how (most) visitors get to my site: Since the referring URL usually contains the search terms, I also can see what words they used in their search on Google, Yahoo, MSN, or Ask Jeeves. They also supply the entry page, exit page, total pages viewed, local time, browser, operating system, etc. But I never knew where they went when they were done. Now, apparently, I will sometimes find that out.

The “out click” field shows the link on my page they clicked on and where that link leads to. For instance, in the example below a guy in Oregon, working for Xerox, used Google at 10:46 AM local time to search for “ipod aa battery,” and visited 7 pages before finally clicking on the “$14” link for the Griffin PowerPod iPod car power adapter (I’ll find out tomorrow if anybody bought one of those). However, it doesn’t track everyone, maybe 10% of visitors. That may be because either they didn’t click on a link on my page or they had javascript turned off (most of the stats require javascript).

Pretty neat. Also amazing how much you can find out about a visitor when they come to your web site.

Continue reading “Out Clicks”

Fraud Robot

Today as I was watching a Nature program I had recorded, I got a phone call. I answered it and was greeted by a robot voice. Before I could hang up, the robot identified itself as being a fraud alert on my Citibank credit card. It said there had been some suspicious activity on my account and asked me to verify two recent transactions. The first was for $10 at Kroger (which, because robots is so dern stupid, it just called “grocery supermar”). The second was for a couple of thousand dollars at “veterinary specialists” for Katie’s operation. Oooohhhhh . . . I said it was okay, but I’m glad that got their attention.

Clark’s Nutcracker

I was watching an episode of Nature on PBS about animal intelligence. One of the case studies was the Clark’s Nutcracker which lives in the American West (their example bird was at the Grand Canyon, which may be because it made for better scenery). I knew that birds do some amazing things. Migration is no picnic, but there are bower birds that build elaborate houses to attract mates and woodpecker finches in the Galapagos that use sticks to fish out bugs from trees. Anyway, the Clark’s Nutcracker likes to eat pine nuts, but they are only around for three weeks of the year. So apparently it picks as many as it can and then hides them by burying them in the ground and sometimes marking the spot with a small pebble. It seems like it would be easier to store them all in the same place, but it scatters the nuts out over hundreds of square miles, only putting a few in each place. It then has the memory to come back later in the year to retrieve the nut. That’s a good trick, but the amazing part is that during that three week period it will hide as many as 30,000 nuts and retains memory to retrieve 90% of the nuts it hides.

The show was Part 1 of the 3-part series that was done in 2000 but is being shown again. Part 2 is this weekend.

Katie’s Other Knee

Katie has been limping around a lot lately, with some obvious problems in her back right leg. Two years ago she had to have knee surgery on the back left leg, and these symptoms looked very familiar. She doesn’t whine or whimper, but it obviously gives her so much trouble that we’ve essentially stopped taking walks. Because the specialist who treated her last time only works from referrals, I took her to my vet last week and got the referral (this time I made sure they didn’t x-ray her which last time cost me $200 to put her under and have the x-ray taken, only to have the specialist use his own much better x-rays that didn’t require her to be under anethesia).

Before I took her in today they had said that if surgery was required they might do it today. That meant I would get her back tomorrow and I signed leave for that day and Friday to stay home with her and make sure she doesn’t have problems or move around too much.

The doctor examined her and said she did need the surgery and she should be able to recover fully, but he wanted to have blood work done to head off any possible problems with the anesthesia and surgery. Because it takes a day to get those results back they will now be doing the surgery tomorrow.

Keep your fingers crossed for Katie. Even if all goes well, she is under house arrest for the next eight weeks. (See a follow-up after two weeks)

Continue reading “Katie’s Other Knee”