473,386 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ParentList Help Us

Hi all. Thanks for thy reply now.

Ive a problem parentlist script.

[HTML]<select size="8" name="parentList" multiple>
</select><a href="#stay" onclick = "javascript:small_window('modify.asp');" ><font size="2">add</font></a><font size="2">|</font><a href="#stay" onclick = "javascript:deleteSelectedItemsFromList(parentList );"><font size="2"> Remove</font></a>
[/HTML]
and modify.asp

Expand|Select|Wrap|Line Numbers
  1. <script language="JavaScript">
  2.  Begin
  3. <!--
  4. // Add the selected items in the parent by calling method of parent
  5. function addSelectedItemsToParent() {
  6. self.opener.addToParentList(window.document.forms[0].destList);
  7. window.close();
  8. }
  9. // Fill the selcted item list with the items already present in parent.
  10. function fillInitialDestList() {
  11. var destList = window.document.forms[0].destList; 
  12. var srcList = self.opener.window.document.forms[0].parentList;
  13. for (var count = destList.options.length - 1; count >= 0; count--) {
  14. destList.options[count] = null;
  15. }
  16. for(var i = 0; i < srcList.options.length; i++) { 
  17. if (srcList.options[i] != null)
  18. destList.options[i] = new Option(srcList.options[i].text);
  19.    }
  20. }
  21. // Add the selected items from the source to destination list
  22. function addSrcToDestList() {
  23. destList = window.document.forms[0].destList;
  24. srcList = window.document.forms[0].srcList; 
  25. var len = destList.length;
  26. for(var i = 0; i < srcList.length; i++) {
  27. if ((srcList.options[i] != null) && (srcList.options[i].selected)) {
  28. //Check if this value already exist in the destList or not
  29. //if not then add it otherwise do not add it.
  30. var found = false;
  31. for(var count = 0; count < len; count++) {
  32. if (destList.options[count] != null) {
  33. if (srcList.options[i].text == destList.options[count].text) {
  34. found = true;
  35. break;
  36.       }
  37.    }
  38. }
  39. if (found != true) {
  40. destList.options[len] = new Option(srcList.options[i].text); 
  41. len++;
  42.          }
  43.       }
  44.    }
  45. }
  46. // Deletes from the destination list.
  47. function deleteFromDestList() {
  48. var destList  = window.document.forms[0].destList;
  49. var len = destList.options.length;
  50. for(var i = (len-1); i >= 0; i--) {
  51. if ((destList.options[i] != null) && (destList.options[i].selected == true)) {
  52. destList.options[i] = null;
  53.       }
  54.    }
  55. }
  56. // End -->
[HTML]</SCRIPT>
</p>
</head>
<body onLoad="javascript:fillInitialDestList();">

<select size="10" name="srcList" multiple>
<option value="1">1
<option value="2">2
<option value="3">3
</select>

<input type="button" value=" >> " onClick="javascript:addSrcToDestList()">
<input type="button" value=" << " onclick="javascript:deleteFromDestList();">
<input type="button" value="Add" onClick = "javascript:addSelectedItemsToParent()">
[/HTML]
this code is working with mozilla. But not explorer.

and this pictures.



Mozilla


Explorer



thanks...
Nov 8 '07 #1
3 1390
look at link please

http://www.tuncsoft.com/Parent/deneme.asp
Nov 8 '07 #2
acoder
16,027 Expert Mod 8TB
Can you give some more information, e.g. errors?

What doesn't work in Internet Explorer?
Nov 9 '07 #3
First thanks for thy message.


I selected any items this listbox and add listbox in main form. Next, i cant use this items in asp code. Because Internet Explorer is not cover selected items. But Mozilla working.

Expand|Select|Wrap|Line Numbers
  1. <%
  2. MySelecteditems=request.form("parentList")
  3. response.write(MySelecteditems)
  4. %>
  5.  
result in internet explorer is empty.
Nov 9 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Robert Zurer | last post by:
Assuming that I have created a strongly typed collection and overridden the appropriate methods, i.e. this, Add, Insert etc., so that a sort order is maintained, it's still very possible for a...
1
by: Adam Knight | last post by:
Hi all, I have two Datalists. One is nested within the HTML of another. What i need to do is determine the current item index of the parent datalist in the OnItemBound of the child. Public...
12
by: joshd | last post by:
Hello, Im sorry if this question has been asked before, but I did search before posting and couldnt find an answer to my problem. I have two classes each with corresponding linked lists, list1...
4
by: gyanendar | last post by:
Hi All, I have to bind DataGridView with the List<Class> . By specifying DataPropertyName of the column to the property name of class my code is working fine. Now I have a class whose property is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.