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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding values

Status
Not open for further replies.

ebase

MIS
Jan 7, 2004
40
US
Hello,

I am currently trying to create an email function which enables the user to add multiple recipients from a list and send out an email. I have created something simple that uses a dropdown box but this only allows adding one email at a time. Can someone help or point me in the right direction?

If someone knows of a script (doesn't have to be free) that has this email function I would appreciate it if you can provide me a URL to the product. Thanks!!!!

Code:
<html>
<head>
</head>
<body>
<script type="text/javascript">
<!--
document.write("Send offer mail!!");

xx = new Array(); i = 0;
xx[i++] = "email One";
xx[i++] = "email Two";
xx[i++] = "email Three";
yy = new Array();

function addItem()
{
	flag = false;
	i = document.getElementById("list").selectedIndex;
	for (j in yy) {
		if (yy[j] == i) flag = true;
	}
	if (!flag)	yy.push(i);
	showItems();
}
function showItems()
{
	e = document.getElementById("right");
	e.innerHTML = "";
	for (i in yy) {
		e.innerHTML += xx[i] + "\n";
	}
}

// -->
</script>

<form action="#">
<table border="1"><tr>
<td>
	To: <select id="list">
	<script type="text/javascript">
	<!--
		for (i in xx) {
			document.write('<option value="' + i + '">' + xx[i] + '</option>');
		}
	// -->
	</script>
	</select><br />

	<input type="button" onClick="addItem()" value="Add">
	<input type="button" onClick="delItem()" value="Del">
	<input type="button" onClick="addItem()" value="Add all">
	<input type="button" onClick="delItem()" value="Del all">
</td></tr>
<tr><td>
	<textarea id="right"></textarea>
</td></tr>
<tr><td>
	(Offer detail)

</td></tr>
<tr><td>
	<input type="button" value="Cancel">
	<input type="button" value="Send">
</td></tr>
</table>

</form>

</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top