View Single Post
 
Old July 21st, 2004, 02:11 AM
PKC PKC is offline
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default document.getElementById().

Hi,
I am very new to xslt.
I have used a dhtml menu in my xslt.
The menu will work like the (priority)Flags menu in MS outlook.
My problem is..
Each row of my table has Flag images.Flags onclick will
display the flagsmenu.The selected flag from the menu
shud replace the corresponding flag in the table.
I generate unique ids for the images using generate-id().
How can i refer the generated id using document.getElementById() in
my javascript?

Each menu item(flags) is linked to a function say,
java_script_:changeimg('BlueFlag')
The code goes like this...
function changeimg(imagename)
{
if (document.images)
{
document.getElementById('FlagOne').src=imagename;
}
Here,'FlagOne' is a static id of a flag. So, i have generated unique ids
for each flag dynamically.How can i refer the generated id using document.getElementById() in my javascript?

Help Me Please!
Thanks in advance.
pkc.