[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

JS Menu and Smart Navigation

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
SlammingRumJoseph
Asked:
SlammingRumJoseph
  • 5
  • 2
1 Solution
 
alambresCommented:
label the td, this is:


<td id="myCell">

to reference it just :

document.getElementById('myCell')
0
 
SlammingRumJosephAuthor Commented:
sorry, i am being dim. how would i call the function referencing that cell?
0
 
alambresCommented:
I don't understand ya. send code plz
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
alambresCommented:
are you using document.write?
0
 
SlammingRumJosephAuthor Commented:
yeah, and i added this in
var c = document.getElementById('myCell'); document.c.write.......
But it didnt like it.
0
 
alambresCommented:
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
 
alambresCommented:
if not:

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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now