Hi I'm kind of a new to javascripting but I was wondering if you good web developers could give an example of an email suggestion box?

And for the second question. Would JQuery be affecting the performance if I would implement it on SaaS applications ?
For example if I want to implement like google calendar with jquery, would it be complex or would you go for it?

Ok so for example , you do a query and get results, store them in an array and then we want to press down, up to choose the emails from the suggested fields.

if (key == 38) { //up
    //make some sort of mark previous

    if (contact_array_counter < 0) {
        alert("don't go UP");
    } else {
        alert(contact_array_recipienthtml[contact_array_counter] + " and the contact_rec: " + contact_array_recipient[contact_array_counter]);

        contact_array_counter--;
    }
}


if (key == 40) { // down
    //make some sort of mark next

    if (contact_array_counter == found_hits-1) { //reached max hits, can't go any further
        alert("limit");
    } else {
        contact_array_counter++;
        alert(contact_array_recipienthtml[contact_array_counter] + " and the contact_rec: " + contact_array_recipient[contact_array_counter]);

        //somehow mark the suggestion box indexed, 



    }

Recommended Answers

All 2 Replies

It could be me, but I am not following your question very well. Can you clarify what you mean by "email suggestion box"?

Also with regard to your question about performance and jQuery... do you mean affecting performance for the client? Well, with regard to jQuery keep in mind that its only a JavaScript library. You should use jQuery when the benefits of the code out weighs the extra information that needs to be download and processed by the client (web browser). Without knowing the specifics, its hard to say. There are many factors you have to consider when trying to optimize the "browsing experience".

With regard to the code you provided, I'm not clear on how this relates to your question.

oh sorry, what I meant is that email suggestion box like hotmail has when it shows up emails when typing in email addresses as suggestions, then you can use arrow buttons to choose these mailboxes. I was wondering how we could do it in javascript as though trying to highlight them, for example these boxes: http://jsfiddle.net/CyQ2w/7/

case: So I write the email I want to send, then it lists up the emails stored in a database (might be those you have added in your contactlist for example), and I want to highlight them with up and down arrow functions. So I have stored the results(from the query) in an array, but I can't find any good javascript for highlighting when I want to choose a person. Right now the only thing that works is highlighting when the mouse points on the suggestion box of the email.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.