• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Javascript expand won't work in Netscape

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Created an expandable menu which works fine in IE, but not in NS. I've tested and it's not the onclick funtion. Can you make any suggestions as to the problem?
Code on menu page --
on[do]Click='javascript:expand(this);return true;
Code for expand function --
function parseId(id, part)
{
var p1, p2;
p1 = 0;
p2 = id.indexOf("_");
if (part == 1)
return id.substring(p1, p2);
p1 = ++p2;
p2 = id.indexOf("_", p1);
if (part == 2)
return id.substring(p1, p2);
p1 = ++p2;
p2 = id.length;
return id.substring(p1, p2)
//return true; doesn't work here to enable the dropdown to show
}
function expand(parent)
{
//alert ('You are now leaving my site')
var id, par, me, lvl;
var id, cpar, cme, clvl;
var i;
// check level and see if the menu is expanded then

par = parseId(parent.id, 1);
me = parseId(parent.id, 2);
lvl = parseId(parent.id, 3);
for (i = 0; i< Table1.rows.length; i++)
{
tr = Table1.rows.item(i);
cpar = parseId(tr.id, 1);
cme = parseId(tr.id, 2);
clvl = parseId(tr.id, 3);
if (clvl > lvl)
tr.style.display="none";
if (cpar == me)
tr.style.display="inline";
//return true; doesn't work here to enable the dropdown to show
}
//return true; doesn't work here to enable the dropdown to show
}
// -->
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Before I go looking into this deeply, what version of Netscape are we talking about here?
 
jenny cook
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are testing in Netscape 7.1 and it doesn't work. Any help that you can give would be really appreciated!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic