Tuesday, June 27, 2006

Motorola v360 : The Quest for Answers

Just got a new phone. Used to have a Samsung E105, which is probably the smallest flip phone I've ever seen. It's very nice for exactly that feature. But it's not very modern -- no camera, no MP3, no Bluetooth. As a matter of fact no graphics at all, so it's not even like my wife can send me pictures of the kids and things.

So I went with the Motorola v360, which gets excellent reviews. It tends to be compared directly to the RAZR, and wins for the most part on "doesn't feel like it'll break when you drop it" factor.

But man, the interface sucks. I can't find any information on the thing. The user's manual is painfully bad. (Here's a hint on how bad -- the word "ringtone" does not appear in the manual.) So I'm looking for answers. One of the first things that I want to do is create an MP3 ringtone from my own sources. All my googling has shown is people either saying that they too want to do it, or saying "Yes, the v360 can play MP3 ringtones", but no specifics on how to do it.

I did hear one rumor that certain service providers can lock out that feature so that you have to buy only premium content. I called up T-Mobile to ask about that and the rep I spoke to said nope, never heard of such a thing. But she couldn't explain to me how to do it.

I've got an MP3 on the phone (specifically, on the memory card). I heard one possibility that you a) have to have the MP3 on the phone itself, and b) it has to be less than 15 seconds in length. I find it hard to believe that once I complete those constraints some new menu items will magically appear, but it's worth a shot. I'll keep posting here with updates. Until then, if anybody has a v360 and knows how to play your own MP3 files as ringtones, let me know!

Technorati Tags: , , ,

Monday, June 12, 2006

Ruby on Rails : start_form_tag with onsubmit javascript event hook

[Continuing to follow my rule of "If I spend a few hours googling for it and can't find the answer, when I do find the answer, post about it."]

I wanted to add an onSubmit="getComment()" handler to a form that is managed by Rails:

<%= start_form_tag :action=>'update', :id=>@alert %>


I tried a whole variety of combinations of sticking my option on the end - calling it onsubmit, onSubmit, on_submit, wrapping it in option=>{..}, html_option=>{...}, wrapping the whole thing, and so on. In most cases all it did was take whatever I added and stick it onto the end of my action url so I'd have things like "/update/18onsubmitgetcomment".

Turns out you need to batch up all of the options that are meaningful to Rails together (using {...}), and then you can put in your own option which becomes an HTML option (i.e. just passed through to the page):

<%= start_form_tag({:action=>'update', :id=>@alert}, :onsubmit=>'getComment()') %>


Note that the action and id tags are within the curly braces, and my onsubmit tag is not.

I'm sure that this is the kind of thing where, now that I know it, I could easily spot something in the documentation that says exactly what I just said. But obviously something didn't click until I had an actual use for it, and only having tested things that fail, and found something that works, can I make the leap backward and say "Aha, now I get it."


Technorati Tags: ,