|
Hi
I'm new to DHTML and I'm having a problem with a tab menu. The tabs are deffined like this:
// Tab Name | URL | * (Default Selected Tab)
var tabs = new Array
(
/*BUGFIX*/ new Array(""),
new Array(" PAGE1 |PAGE1.htm|*"),
new Array(" PAGE2 |PAGE2.htm|*"),
new Array(" PAGE3 |PAGE1.htm|*"),
new Array(" PAGE4 |PAGE1.htm|*"),
new Array(" PAGE5 |PAGE1.htm|*"),
new Array(" PAGE6 |PAGE1.htm|*"),
new Array(" PAGE7 |PAGE1.htm|*"),
new Array(" PAGE8 |PAGE1.htm|*"),
);
|
|
The thing is that I don't want fixed tab names. I want to have the possibility of have a hidden text box with the label I want to use.
I tried to do this:
var x=document.form.page1.value (Where page1.value is the label I want to use in one of the tabs)
var tabs = new Array
(
/*BUGFIX*/ new Array(""),
new Array(x+" |PAGE1.htm|*"),
new Array(" PAGE2 |PAGE2.htm|*"),
new Array(" PAGE3 |PAGE1.htm|*"),
new Array(" PAGE4 |PAGE1.htm|*"),
new Array(" PAGE5 |PAGE1.htm|*"),
new Array(" PAGE6 |PAGE1.htm|*"),
new Array(" PAGE7 |PAGE1.htm|*"),
new Array(" PAGE8 |PAGE1.htm|*"),
);
|
|
But this gives an error. Also, the x variable declaration gives error.
How can I interact the DHTML code with my page?
I hope I made myself clear...
Thanks in advance
Rui Gonçalves
|
|
|
|
|
|
|
|