• 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 function ..Is it ok?

 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!!
I have got one source file of javascript function.
I have included it at between my <head> </head> for the document.
Basically it gives you some functios to call so as to create
the lists in tree form like:-
myList.sub[0]= new sub ('a');
myList.sub[1] = new sub ('b');
myList.sub[1].sub[0] = new sub ('ba');
myList.sub[1].sub[1] = new sub ('bb');
myList.sub[2] = new sub('c');
Then I call the (createList(myList)), which in turn produces this list.
I have done this code inside a script. Up to this every thing is fine.
Now I want to link say myList.sub[2] with some link (say, javascript:loadLists(myList)) and write the javascript function loadList like:-
<script language ="JavaScript"><!--
myList.sub[3] = new sub('d');
createList(myList);
-->
</script>
But this doesn't work. Whenever I click on the link, nothing appears on the page.
Are the infos given, is sufficient to help me out? If no, plz. write, so I'll send the codes also.
Thanks
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need more info to figure out your problem.
Eric
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mishra,
Is that the full javascript function? It looks like you posted everything because you included the script tags. You are missing the function keyword.

If this isn't the problem, can you post the full function and the link?
 
Pay attention! Tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic