Similar Threads:
1.JavaScript: html list items within list items?
Hi,
I've seen how to implement a JavaScript to change the CSS class of every other
list item in an unordered list, but, being new to JavaScript, I'm trying to
puzzle out how I can exclude list items within a list item of the targeted
unordered list from being included in the function. In CSS, I can refer to a
descendent li by coding: li li.
Perhaps there is a JS method to look at the parent element of the targeted
element ... I have to figure out how to keep these nested list items from being
included in the function. The function uses the modulus to determine whether or
not the element is even or odd-numbered, then it changes the CSS class if it's
even.
Thanks,
Ted
2.List Box Crash When Several Items Added
I have looked everywhere I can for a solution to this problem but
nothing so far has worked.
I have two list boxes in my form. The first one (selAvailable) is
populated from an access database. The second (selSelected) is
populated by selecting items in selAvailable and clicking the add
button. In some situations there can be hundreds or thousands of items
in the selAvailable list box. If a user selects a few hundred or
clicks the Add All button the selSelected list box will begin to
populate until the whole page freezes then crashes.
I tried making the list box selSelected invisible before added items
to it but that did not help.
I know it seems that no user would ever want to have a list box with
so many items but in the context of my webpage it is needed.
Below is the Add All code that adds all of the items from the
selAvailable list box to the selSelected list box. I greatly
appreciate anyones help, thank you very much in advance.
~Julia
function AllAdd()
{
var i
var count
var selectedText
var selectedValue
var selAvailableLength = frmSelect.selAvailable.length
var selSelectedLength = frmSelect.selSelected.length
var newoption
var count = selSelectedLength + 0;
for (i = 0; i < selAvailableLength; i++)
{
selectedText = frmSelect.selAvailable.options[i].text;
selectedValue = frmSelect.selAvailable.options[i].value;
newoption = new Option(selectedText, selectedValue, false, false);
frmSelect.selSelected.options[count] = newoption;
count = count + 1;
frmSelect.selAvailable.options[i] = null;
selAvailableLength = frmSelect.selAvailable.length;
i--;
}
}
3.data loss while moving items between lists box using javascript
I have two list boxes and am able to have the user move items back and fourth
between them without post back but when the save button is selected (that
saves data to the dbase from the list box) it appears that there is no data
in the destination box. Is there a way to fix this problem using hidden
controls or some other method, thanks.
--
Paul G
Software engineer.
4.javascript: adding values to list box
Hi,
I have a form, and in this form, there are 2 drop down list a text box, one button (labelled "add" )and finally, a listbox.
The question is, when the user clicks on the add button, how do I add the value selected in the drop down list and the text box values and put it into the listbox? After adding to the listbox, the selected value needs to stay in the drop down menu and not get removed. Thanks in advance
5.Split long list of list items
6. populating an asp list box from a simple access lookup list (single column not a table)
7. list box with items for deletion passed from php array
8. Transferring list box items