[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

JS Menu and Smart Navigation

Posted on 2004-04-15
8
Medium Priority
?
242 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
[X]
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
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 2000 total points
ID: 10834321
if not:

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

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

650 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