On Nov 23, 4:46 pm, yetanother <[EMAIL PROTECTED]> wrote:
> $("ul#"myID).load("data.html");
>

You need to use JavaScript string concatenation to build the selector:

$("url#" + myID).load("data.html");

Also, you'll probably want to avoid assigning the same ID to two
different elements.  You're constructing invalid HTML otherwise, and
it'll likely cause weird results with some browsers.  The way I'd do
it is to have the two IDs follow some convention, but with different
prefixes, eg. assign $id to the link and content_$id to the list
elements.  Then construct the list element ID from the link value:

$("#content_" + myID).load("data.html");

You don't need the ul selector then, because an ID uniquely identifies
a single element on the page.

- Jonathan

Reply via email to