Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. AlisonMC

    How to determine if object is null/empty

    Worked it out :) like this: function SelectedItems() { var lstMinor=document.getElementsByName("ListboxMinor") var lstMajor=document.getElementsByName("ListboxMajor") if ((lstMajor.length != 0)&&(lstMinor.length !=0)){ /* do nothing */ } alert(lstMajor.length + " elements!") }
  2. AlisonMC

    How to determine if object is null/empty

    Thinking about it a bit more, I think the issue is that in some cases the listbox referred to is present on the page and in others it is not. How can JavaScript code detect the presence or absence of that listbox and either run the code or bypass it if the listbox is not on the page? Thanks!
  3. AlisonMC

    getting current homepage

    You might have to be a bit more specific. What exactly are you trying to achieve?
  4. AlisonMC

    How to determine if object is null/empty

    I have some JavaScript which selects items from a listbox when a button is clicked. However, there could be times when there are not items at all in the listbox. How do I determine this so that the full JavaScript does not run if there are no items in the listbox? Currently I have the following...

Part and Inventory Search

Back
Top