: 21 : 21 : 0 |
The current implementation of id's in XPages is -very- cumbersome, and makes it harder to write unobtrusive JS. A workaround for this would be to make a hashmap (converted to a JS object in the browser) of all the element names/their rendered id.
I would think this shouldn't be too hard to implement in the compiler-engine..?
--
// Pseudocode for the browser (I don't know the XSP API)
XSP.byId = function( id ){
id = XSP.pageIds[id] || id;
return document.getElementById( id )
}
|