473,395 Members | 1,535 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,395 software developers and data experts.

exchange select entries

hi,

I got several entries and two checkboxes and I would like to exchange the
entries from one select to the other. like 'Add' and 'Rmove'. Is it possible
anyhow? Can anyone help me where to start? Thank you very much!
[My HTML]
<form action="select.php">
<p>
<select name="ham" size="10">
<option>Example1</option>
<option>Example2</option>
<option><!--address--></option>
</select>
<input type="button" name="ToSpam" value=">>"
onClick="moveSpam()">
<input type="button" name="ToHam" value="<<"
onClick="moveHam()">
<select name="spam" size="10">
<option>ExampleA</option>
<option>ExampleB</option>
<option><!--address--></option>
</select>

</p>
<input type="submit" value=" OK ">
</form>
[/My HTML]
Jul 23 '05 #1
3 1703
Ron Eggler @ work wrote:
I got several entries and two checkboxes and I would like to exchange
the entries from one select to the other. like 'Add' and 'Rmove'. Is
it possible anyhow? Can anyone help me where to start?


Start with a library that makes it easy :)
http://www.javascripttoolbox.com/optiontransfer/

Hope that helps!

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Jul 23 '05 #2
Matt Kruse wrote:
Ron Eggler @ work wrote:
I got several entries and two checkboxes and I would like to exchange
the entries from one select to the other. like 'Add' and 'Rmove'. Is
it possible anyhow? Can anyone help me where to start?


Start with a library that makes it easy :)
http://www.javascripttoolbox.com/optiontransfer/

Hope that helps!


Hey Matt,

Thank you for that useful link! But didn't get it to work till now :(
IE says opt would be NULL or no object in line 33 which looks like this:
<body bgcolor="#FFFFFF" text="#000000" onLoad="opt.init(document.forms[0])">
and my head looks like this:
<head>
<title>iNetGate pop-spam-filter</title>
<script LANGUAGE="JavaScript"
SRC="combined-compact/OptionTransfer.js"></script>
<SCRIPT LANGUAGE="JavaScript">
var opt = new OptionTransfer("ham","spam");
opt.setAutoSort(true);
opt.setDelimiter(",");
opt.setStaticOptionRegex("");
opt.saveRemovedLeftOptions("removedLeft");
opt.saveRemovedRightOptions("removedRight");
opt.saveAddedLeftOptions("addedLeft");
opt.saveAddedRightOptions("addedRight");
opt.saveNewLeftOptions("newLeft");
opt.saveNewRightOptions("newRight");
</SCRIPT>
</head>
so, don't understand it, where's the problem?
Thank you! :)
Jul 23 '05 #3
Ron Eggler @ work wrote:
Matt Kruse wrote:
Ron Eggler @ work wrote:
I got several entries and two checkboxes and I would like to
exchange the entries from one select to the other. like 'Add' and
'Rmove'. Is it possible anyhow? Can anyone help me where to start?


Start with a library that makes it easy :)
http://www.javascripttoolbox.com/optiontransfer/

Hope that helps!


Hey Matt,

Thank you for that useful link! But didn't get it to work till now :(
IE says opt would be NULL or no object in line 33 which looks like
this: <body bgcolor="#FFFFFF" text="#000000"
onLoad="opt.init(document.forms[0])"> and my head looks like this:
<head>
<title>iNetGate pop-spam-filter</title>
<script LANGUAGE="JavaScript"
SRC="combined-compact/OptionTransfer.js"></script>
<SCRIPT LANGUAGE="JavaScript">
var opt = new OptionTransfer("ham","spam");
opt.setAutoSort(true);
opt.setDelimiter(",");
opt.setStaticOptionRegex("");
opt.saveRemovedLeftOptions("removedLeft");
opt.saveRemovedRightOptions("removedRight");
opt.saveAddedLeftOptions("addedLeft");
opt.saveAddedRightOptions("addedRight");
opt.saveNewLeftOptions("newLeft");
opt.saveNewRightOptions("newRight");
</SCRIPT>
</head>
so, don't understand it, where's the problem?
Thank you! :)


Can't anyone else help me?
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: warren ali | last post by:
Hi all! I'm new to python and I seem to have a hit a of a brick wall. I hope you guys can help. I'm trying to rewrite some of my vbscripts in python. This particular script connects to a...
5
by: callmebill | last post by:
I'm relatively new to javascript, and I'm trying to decide whether the following (and if so, clues on how to do it): I'd like to create two HTML multiple-select boxes. The first would be a list...
0
by: gerry | last post by:
I have an async OnStore event written in c# and registered in exchange 2003. Everything seems to be working fine other than the SaveToFile(). If there is an error in the iMessage.DataSource.Open (...
2
by: George Durzi | last post by:
We recently upgraded to Exchange2K3/W2K3 from Exchange2K/W2K, and some of my c# code that I used to access users' contacts using WebDAV has stopped working. I'm getting a 401 unauthorized error....
3
by: Christoph M?der | last post by:
Hello, i am writting an programm which should connect to an exchange server and get calendar entries. i have tried it with ADODB, but there was a problem: sometimes it works, sometimes not. ...
2
by: unabogie | last post by:
I have a table with entries tied to a membership database. The problem is that I want to select a limit of sixteen entries per member, per day, where some members have 16+ entries per day. I...
1
by: ouistyty | last post by:
Hi We have a simple asp page that query LDAP attribrute. Everithing is working fine using a native domain account. but when using an external account we have an error 70, acces denie. Here's...
7
by: beary | last post by:
I'll try to explain the problem, but it may not make sense. I have a mysql table with columns like id,title,speaker,day,month,year, topic etc. At present, my syntax is select * from files order...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.