The way you've described it, if you want to have the same name on two elements, you might be using a class instead of an id.
instead of <div id="something">content</div> try <div class="something">content</div> - which will freely let you use it multiple times safely. On Nov 24, 4:07 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > 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