Monday, October 26, 2009

Scout gets his sea legs

Scout onboard a boat!On one of our last afternoons on Isla Mujeres, Mexico, we did a boat trip with our friend Ariel and his wife Rosa. I had done one with them and their son Edric earlier in our stay, but this time I was taking Nan, our friend Juan's son Manolo, and our dog Scout. The main reason for the trip was so that I could get some more photos for the cookbook I am working on with Juan and his wife Paula. It was also an opportunity for Nan to see the island from a different vantage point, for Manolo to get out on the water in a boat other than a ferry, which he had never done before, and for us to see how Scout would handle being on a boat.

I'm happy to report that Scout did very well. Ariel beached the boat so that I could hoist Scout aboard without getting him wet, and he settled down right away in a shady spot next to the helm, where he could look over the gunwale at pelicans and passing boats. Scout had been swimming every day, so he must have wondered how it was possible to be out in the water without swimming or getting wet. More likely, he was probably thinking, "What's up with this weird car?" The motion didn't seem to bother him but the heat sure did. He was fine as we motored south down the west coast of the island into the cool prevailing wind. But when we turned around at Punta Sur and headed back north, we lost our breeze, and he started panting, seeking shade, and drinking cold water out of a plastic cup.

Nan and Manolo enjoying the boat tripIf our lives go as planned, we hope to travel extensively in the future, most likely in a sailboat, and we want to take Scout with us whenever possible. So taking Scout with us to Mexico was something of an experiment. We wanted to see how he would do with travel, including flying, being in a different climate, swimming in saltwater, riding in a golf cart, eating foreign-made dog food, being around semi-feral dogs, and riding in a boat. We chose Isla Mujeres because it is a place Nan and I have been to six times in the last eleven years, so getting there and living there are very familiar to us.

We did our homework on transporting animals internationally and thought we had it all worked out, but in addition to the five vaccinations on his official US health certificate, the Mexican authorities wanted proof of preventive treatment for internal and external parasites. Fortunately, we had a receipt from the veterinarian for Frontline (for fleas and ticks) and Heartgard (for heartworms), or we would have needed to pay a vet to come to the airport and examine Scout before he could enter the country. We also made the mistake of taking a small quantity of Mexican-made dry dog food back into the US with us to tide Scout over until we reached home. The customs officer let us through with it but told us it was normally prohibited. Next time, we'll leave a small bag of dog food in the car for the trip home.

In my opinion, the experiment was a success. We did not encounter any obstacles, either in our travel to and from Mexico or in the four weeks we spent there, that had us thinking that we were recklessly endangering Scout's safety or that it had not been worth it to bring him along. That's not to say that Scout wasn't completely thrilled to be home again, because he most definitely was.

Thursday, October 15, 2009

ColdFusion Cascading Dropdown Menus

So far in this blog, I have not shared much about what I do for a living, which is to develop Web-based applications for a small hospital. I don't think posts about my work would be very interesting to most readers, but today I experienced a small programming triumph that I feel compelled to share because I don't think anybody else has figured it out, or if they have, they haven't posted it on the Internet anywhere that I could find it.

The programming issue I was working on involved two dropdown menus: one for a category and another for a subcategory. Ideally, the choices in the subcategory list would be contingent upon what was chosen in the category list instead of displaying every possible subcategory. For example, if you chose "Fruits" as the category in a list of food types that also included "Vegetables", the subcategory choices would be "Apple", "Peach", "Pear", "Plum", etc., without "Broccoli" and "Brussels Sprouts" also showing in the list.

Most of what I do involves ColdFusion programming. ColdFusion is a server-side programming environment that will manipulate variables only when programmed webpages are first loaded. There is no provision for "dynamic" variable manipulation as the user makes changes on a webpage, like filling out a form. For that, I normally use JavaScript, a client-side programming language. The big hurdle is that ColdFusion and JavaScript do not talk to each other very well. It is possible to pass a variable to JavaScript from ColdFusion using a "ToScript" routine, but what I needed was to pass a variable from JavaScript to ColdFusion, which is not possible.

After searching the Web extensively, I came upon a JavaScript script written by Ioannis Cherouvim that presented an HTML version of the solution I was looking for. I copied it and got it working, then customized it with ColdFusion-generated content. It worked!

Here is the complete code:

Section 1 code for ColdFusion cascading dropdown menus
Section 2 code for ColdFusion cascading dropdown menus
Section 3 code for ColdFusion cascading dropdown menus
I apologize that the code is in screenshot images but Blogger tried to parse the code when I pasted it in directly. I also apologize for all the white space, but that was necessary to keep Blogger from resizing the images. Click the images for full-size versions. Email me if you would like the text file.

A couple of notes:

  1. Obviously, in order to be useful, the table would need to be enclosed within a form that would post the category and subcategory choices.
  2. The queries are pulling from two different tables, one with just the categories and another with both the categories and the subcategories, with the appropriate category repeated for every associated subcategory. It might be simpler to use just the second table and to have the first query point to it with a "distinct" condition.

To see a live example, please click here: ColdFusion Cascading Dropdown Menus

UPDATE: I apologize that the link is no longer valid.

Wednesday, October 14, 2009

Home from Isla Mujeres

Scout is happy to be home even if it's for rent!Nan, Scout and I arrived home safely from Isla Mujeres over the weekend. On Saturday, we flew from Cancun, where it was in the high 90s with almost 100% humidity, to Denver, where it was in the mid-20s and dry--more than a 70-degree temperature difference! The delayed flight was smoother and Scout did better, with no apparent air sickness. We needed to keep him in his crate until we passed through customs, and he was a good boy--no whining, barking or fidgeting. There were no problems except one: we had brought a small amount of Mexican-made dog food with us to tide Scout over until we got home. The customs officer told us this was a no-no but he let us through with it.

We made it to an airport hotel by 11:00 PM, stayed the night, and then drove the five hours back to Grand Junction on Sunday, arriving in the mid-afternoon. As we pulled up to our home, we saw balloons and a sign announcing that our house was for rent! Our neighbors, Rich and Diane, who had been watering our outside flowers, love a good practical joke. The stinkers! When I checked my cell phone messages later, there was one from someone inquiring about the rental. I recognized Rich's voice and had a good second laugh.

Thursday, October 1, 2009

Expatriates on Isla Mujeres

Sunset from our deck in Isla MujeresIn the first few days we were here on Isla Mujeres, we met a few different sets of expatriates, mostly from the United States and Canada. Each expressed to us that they love it here so much that they were willing to leave behind their homes, families, friends and possessions to live here full time. None expressed any regrets, except maybe not having done it sooner.

We met Malcolm our first Sunday night when we went to Sancocho's to eat dinner and watch the Packers play the Bears in their home opener. It is off-season here and Sancocho's was the only bar showing the game. Malcolm is from Canada and has been on the island since they improved Internet access to a level that allows him to work remotely as a Web developer. Shortly after we were seated at a table adjoining Malcolm's, his friend Greg came in and sat down. We think Greg is from California because he mentioned that he had an engineering degree from Stanford. He is also doing remote development. Neither seemed to speak much Spanish, and they didn't show much patience with the waitresses. They struck me as single guys who were merely living in the island community rather than being a part of it, more like long-term tourists than new citizens. I doubted if they had many local friends other than expats like themselves.

Roger and Garnette retired here from government careers in Denver. They had vacationed in Cancun twelve years ago and taken a day trip to the island. They fell in love with it and relocated two years ago. They live frugally, renting a place in the La Gloria colonia (neighborhood), about two blocks from the English school where Nan is volunteering, and taking public transportation to get around. They speak adequate Spanish and are active in the community, helping with projects that aid chidren and the poor.

Greg and Natalie are the directors of the La Gloria school. Like Roger and Garnette, they are in their mid- to late fifties. They came here on a vacation two years ago and loved it so much that they closed on a furnished condo before they went back home to Bend, Oregon. They sold almost all of their possessions and moved here with just suitcases, though Greg confesses that he left nine boxes of stuff in storage that he has visiting friends bring one box at a time as checked luggage when they fly here. Of the three different sets of expats we have met, Greg and Natalie seem the most engaged. Through the school, they have come into contact with many local people and assisted them not only with learning English but also with handling personal issues. One evening we saw them on Av. Hidalgo with many bags of Crocs shoes hanging off the handlebars of their motos. They had purchased them in bulk to distribute to needy children. They are greeted warmly everywhere they go.