PDA

View Full Version : multiple includes of the same jsp


wac
05-21-2003, 02:49 PM
This is an HTML and javascript question...

I've got a situation where my jsp (HTML) may be included multiple times within a parent. How do I deal with multiple instances of the same IDs when mucking with javascript/DOM access?

Right now I'm cludging it by prefixing an instance name to each ID. But I don't like this. I feel I need to understand more about namespaces. Is this just an XML concept or is there a way to do this in HTML and make use of it in javascript? I notice in the javascript DOM specs that there's reference to a namespace prefix and a namespaceURI? How can I construct HTML to use this so that document.getElementById takes into account this namespace????