Solved

JS Menu and Smart Navigation

Posted on 2004-04-15
8
232 Views
Last Modified: 2007-12-19
Guys,

I am using smart navigation in an Asp.net page to nice effect. However I now need to add a javascript menu to the page.  There is a problem though. The menu has been implemented using a couple of .js files and I am calling the main function inside a <td> tag.  The problem is that everytime a control with autopostback is used the menu disappears.  I was thinking of possibly calling the function on the page onload event but dont know how to target the output to the necessary table cell.

Does this make any sense? Any advise, suggestion desperately required.

Eagery,

Joe.
0
Comment
Question by:SlammingRumJoseph
  • 5
  • 2
8 Comments
 
LVL 5

Expert Comment

by:alambres
ID: 10833741
label the td, this is:


<td id="myCell">

to reference it just :

document.getElementById('myCell')
0
 

Author Comment

by:SlammingRumJoseph
ID: 10833875
sorry, i am being dim. how would i call the function referencing that cell?
0
 
LVL 5

Expert Comment

by:alambres
ID: 10833893
I don't understand ya. send code plz
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 5

Expert Comment

by:alambres
ID: 10834061
are you using document.write?
0
 

Author Comment

by:SlammingRumJoseph
ID: 10834209
yeah, and i added this in
var c = document.getElementById('myCell'); document.c.write.......
But it didnt like it.
0
 
LVL 5

Expert Comment

by:alambres
ID: 10834301
has the td another content or is just waiting to be filled with the menu?
if it's empty:

//supposing you got the HTML code for the menu stored in variable strMenu

document.getElementById('myCell').innerHTML = strMenu;

0
 
LVL 5

Accepted Solution

by:
alambres earned 500 total points
ID: 10834321
if not:

var newSpan = document.createElement("span");
newSpan.innerHTML = strMenu;
document.getElementById('myCell').appendChild(newSpan);
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now