Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

JS Menu and Smart Navigation

Posted on 2004-04-15
8
233 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
age from date of birth 4 51
Google Maps API and PHP 25 49
jQuery Toggle & Anchor Links 5 43
JS Event Does not Trigger From File 2 24
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.
This article discusses how to create an extensible mechanism for linked drop downs.
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…

809 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