codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Problem with menu  pranxas at 16:10 on Tuesday, March 20, 2007
 

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








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: C++ Beginner question
•  Re: function within loop problem
•  moncler outlet
•  Re: Display swf file in pdf
•  Re: how to create forum using asp.net with c# language?
•  Discount coach store
•  Create Better Maps with Global Mapper
•  Re: How to display a message box when record is temporary stored in session/grid view
•  Sharing object in perl


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012