M
Mechphisto
Let's say I have two DIV tags with the ID's "block1" and "block1b".
I have a JS function to hide one and show the other.
I want to tell the JS to use the pre-determined ID for a 2nd process,
but add the "b" to the end of the value in order to affect the 2nd ID.
How do I do that?
I've tried:
var e = document.getElementById(i);
if (e) {
e.style.display = 'block';
var g = e.value+b;
g.style.display = 'none';
}
and variations on that, like:
var g = e."b";
g.style.display = 'none';
but nothing seems to work.
Any suggestions?
Thanks,
Liam
I have a JS function to hide one and show the other.
I want to tell the JS to use the pre-determined ID for a 2nd process,
but add the "b" to the end of the value in order to affect the 2nd ID.
How do I do that?
I've tried:
var e = document.getElementById(i);
if (e) {
e.style.display = 'block';
var g = e.value+b;
g.style.display = 'none';
}
and variations on that, like:
var g = e."b";
g.style.display = 'none';
but nothing seems to work.
Any suggestions?
Thanks,
Liam