»
EnglishFrenchVietnamese

Print - Send Email Updates - JavaScriptBank.com

Full version: jsB@nk » Email » Send Email Updates
URL: https://www.javascriptbank.com/send-email-updates.html

Send Email Updates © JavaScriptBank.comThis JavaScript can be used to send infomation to a email list.

Full version: jsB@nk » Email » Send Email Updates
URL: https://www.javascriptbank.com/send-email-updates.html



JavaScript
<SCRIPT language=Javascript><!--function editList(){  leftPos = 0  if (screen) {leftPos = screen.width-525  }  editWindow = window.open('edit_recipients_form.htm','editWindow','toolbar=no,location=yes,scrollbars=auto,width=500,height=520left='+leftPos+',top=100,alwaysRaised=true');  editWindow.focus();  if (editWindow.opener == null) editWindow.opener = self;}//////////////////////  WRITE UPDATES FROM EDIT WINDOW TO UPDATE LIST// Adds the list of selected items selected in the child// window to its list. It is called by child window to do so.  function writeToParentList(sourceList) {  destinationList = window.document.forms['updatesForm'].elements['updateList'];  for(var count = destinationList.options.length - 1; count >= 0; count--) {    destinationList.options[count] = null;  }  for(var i = 0; i < sourceList.options.length; i++) {    if (sourceList.options[i] != null)    destinationList.options[i] = new Option(sourceList.options[i].text, sourceList.options[i].value );   }}////////////////////// SELECT ALL OPTIONS// Marks all the items as selected for the submit button.  function selectList() {  sourceList = window.document.forms['updatesForm'].elements['updateList'];  if (document.forms['updatesForm'].elements['selall'].checked) {    for(var i = 0; i < sourceList.options.length; i++) {      if (sourceList.options[i] != null) {         if (sourceList.options[i].selected == false){          sourceList.options[i].selected = true;        }        else {          sourceList.options[i].selected = false;        }      }    }  } else {  }return true;}//////////////////////  DELETE SELECTED FROM UPDATE LIST// Deletes the selected items of supplied list.function deleteSelected(sourceList) {  var maxCnt = sourceList.options.length;  for(var i = maxCnt - 1; i >= 0; i--) {    if ((sourceList.options[i] != null) && (sourceList.options[i].selected == true)) {      sourceList.options[i] = null;    }  }  var mailList = window.document.forms['updatesForm'].elements['updateList'];  if (mailList.options[0] == null) {    mailList.options[0] = new Option("No Recipients Selected");    mailList.options[0].text = "No Recipients Selected";  }}// --></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM name=updatesForm action="" method=post><TABLE cellSpacing=0 cellPadding=0 width=420 border=2>  <TBODY>  <TR>    <TD height=260>      <TABLE height=308 cellSpacing=0 cellPadding=0 width=411 border=0>        <TBODY>        <TR>          <TD bgColor=#669966 colSpan=3 height=11>            <DIV align=center><FONT face="Arial, Helvetica, sans-serif"             color=#ffffff size=3><B><FONT             face="Verdana, Arial, Helvetica, sans-serif">Send Email Updates</FONT></B></FONT></DIV></TD></TR>        <TR>          <TD vAlign=top width=158 height=78 rowSpan=2>            <P>&nbsp;</P>            <P><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>send email updates to:</FONT></P></TD>          <TD width=253 colSpan=2 height=99>            <DIV align=center><INPUT onclick=javascript:editList() type=button value="Edit List" name=editUpdates>&nbsp;&nbsp; <INPUT onclick="javascript:deleteSelected(updateList);window.document.forms['updatesForm'].elements['updateList'].focus" type=button value="Delete Selected" name=deletesel>             &nbsp;<BR><INPUT onclick=javascript:selectList() type=checkbox             value=checkbox name=selall> <I><FONT             face="Verdana, Arial, Helvetica, sans-serif" color=#000000             size=1>Select All </FONT></I></DIV></TD></TR>        <TR>          <TD width=253 colSpan=3 height=93>            <DIV align=center><SELECT style="WIDTH: 150px" multiple size=4             name=updateList> <OPTION>No Recipients Selected</OPTION></SELECT>             </DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->