RTFM, lol

a prof used to say that and after he'd add 'Read The Fine Manual'.....


Jaime Cham wrote:

> Yes, RTFM at http://mochikit.com/doc/html/MochiKit/DOM.html
>
> But to get you started, what you probably want is:
>
> var p = P();
>
> // ... in loop ...
>
> var theTag = SPAN({ class: "choice" },
>                      A({ href: "./getPhotoList.cgi" },
>                         "disney")
>                      );
> appendChildNodes(p, theTag);
>
> // ... end loop ....
>
> replaceChildNodes( "tagcloud", p);
>
> Dana_at_BBN wrote:
> > I'm trying to create an array of anchor (A) tags , load them into a
> > SPAN representing a tag-cloud, and then replace a DOM element,
> > something like:
> >
> > in a loop ...
> >   theTag = A("<a href=\"./getPhotoList.cgi\">", "disney", "</a>");
> >   _x = SPAN ({"class": choice }, theTag,  "  ");
> >   tagDivs.push(x);
> > ... loop-end
> >   replaceChildNodes( "tagcloud", P( null, tagDivs));
> >
> > The problem is that the elements of the DIV are coming out:
> > <a href="./getPhotoList.cgi">Day</a>   <a
> > href="./getPhotoList.cgi">DC</a> <a
> > href="./getPhotoList.cgi">disney</a>  <a
> > href="./getPhotoList.cgi">disneyland</a>
> >
> > Ok, Obviously, I need to RTFM regarding how to use the nifty aliases,
> > but either  I am just too dense or can't find the  manual (so RTFM
> > won't help much).
> >
> > Alternatively, if anyone has a cool example showing the creation of a
> > tag cloud, I am always willing to toss my own code overboard for
> > something better
> > 
> > thanks
> > Dana


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to