Hello There!

Why would the below code work in a 'preview' of the Gadget, but not
when I build package and load into Google Desktop?

I'm trying to set the default text in each edit(textbox), if it gains
focus it clears, a tab would move to the next edit(textbox), typing in
either one would change the text to black, and then an 'enter' key
press (ASCII 13) would perform my doSearch() function.

Thanks in advance for any help.

My Code:

var txtwhatString = "category, business name, keyword or phone
number.";
var txtwhereString = "city, state, address, ZIP code or landmark.";

function view_onOpen() {
}

function onkeypress1() {
txtwhat.color = "#000000";
        if (event.keyCode == 9)
        {
                                        txtwhere.focus();
                                        event.returnvalue = false;
        }
                                if (event.keyCode == 13)
                                {
                                        doSearch();
                                        event.returnvalue = false;
                                }
}

function onkeypress2() {
txtwhere.color = "#000000";
        if (event.keyCode == 9)
        {
                                        txtwhat.focus();
                                        event.returnvalue = false;
        }
                                if (event.keyCode == 13)
                                {
                                        doSearch();
                                        event.returnvalue = false;
                                }
}

function clearWhatData()
{
    if (txtwhat.value != txtwhatString && txtwhat.value) {
        return;
    }
    txtwhat.value = "";
}

function clearWhereData()
{
    if (txtwhere.value == txtwhereString)
    {
        txtwhere.value = "";
    }

    if (txtwhat.value != txtwhatString || txtwhat.value) {
        return;
    }
}

function resetWhatData()
{
    if (txtwhat.value == "")
    {
        txtwhat.color = "#747678";
        txtwhat.value = txtwhatString;
    }
}

function resetWhereData()
{
    if (txtwhere.value == "")
    {
        txtwhere.color = "#747678";
        txtwhere.value = txtwhereString;
    }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Desktop Developer Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Desktop-Developer?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to