document.getElementById()

P

PK

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.
pk.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top