Nothing really pops out at me from your example code. Do you get any
Javascript warnings or errors when that input field gets focus? Or,
better yet, do you have a publicly-accessible demo page that we can
poke around at?
- Kevin
On 11/5/07, feesh <[EMAIL PROTECTED]> wrote:
>
>
> Hi all,
>
> I'm just beginning with Mochikit and have a very basic question. I have
> 3 columns, each of them has a search field at the top. I'd like it so that
> when you select a search field, that column highlights. Then when you tab to
> the next field, the next one highlights, and the previous one goes back to
> normal.
>
> I either don't understand how connect works or I'm doing it wrong, this
> is what I have so far. I tried the addElementClass by itself and it works,
> not sure why the connect doesn't work.
>
> js:
> ---
> function myLoadFunction() {
>
> Mochikit.Signal.connect('product_search', 'onfocus',
> function() {
> MochiKit.DOM.addElementClass("product_column",
> "column_highlighted");
> });
>
> };
>
>
> MochiKit.Signal.connect(window, "onload", myLoadFunction);
> ---
>
> css:
> ---
> .column {
> background-color: white;
> }
>
> .column_highlighted {
> background-color: blue;
> }
> ---
>
> xhtml:
> ---
> <form method="post"
> action="index.php"
> name="main_form">
>
> <div id="product_column" class="column">
> <input
> tabindex="0"
> type="text"
> id="product_search"
> name="product_search"
> value="" />
> <select multiple="multiple" name="product_list">
> ...snip...
> </select>
> </div><!--column-->
>
> </form>
> --
> View this message in context:
> http://www.nabble.com/Connect-Issues-tf4754570.html#a13596135
> Sent from the MochiKit mailing list archive at Nabble.com.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" 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/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---