• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 682
  • Last Modified:

DateTime function integration debug

Hello,

Please help me to debug the javascript error alert that appeared at the lower left corner of the browser. If you have any suggestion that will make any of my javascripts functions neater, cleaner and better. Please do. Here is the source code:

<!--************* Template Top Starts **************-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<LINK href="Includes/styles.css" rel=stylesheet type=text/css>
<SCRIPT LANGUAGE="JavaScript" SRC="javascripts/DynamicOptionList.js"></SCRIPT>
<script language="javascript">
<!--
//Dynamic List Boxes 3 steps: 1.construct as below, 2.function init(), 3.body onload="init()"
var listsubcat = new DynamicOptionList('subcat','cat');
var listsubcat2 = new DynamicOptionList('subcat2','cat','subcat');
listsubcat.addOptions('868','<Unfiled>','0');
listsubcat.setDefaultOption('868','0');
listsubcat2.addOptions('868|0','<Unfiled>','0');
listsubcat2.setDefaultOption('868|0','0');
listsubcat.addOptions('1041','<Unfiled>','0');
listsubcat.setDefaultOption('1041','0');
listsubcat2.addOptions('1041|0','<Unfiled>','0');
listsubcat2.setDefaultOption('1041|0','0');
listsubcat.addOptions('863','<Unfiled>','0');
listsubcat.setDefaultOption('863','0');
listsubcat2.addOptions('863|0','<Unfiled>','0');
listsubcat2.setDefaultOption('863|0','0');
listsubcat.addOptions('858','<Unfiled>','0');
listsubcat.setDefaultOption('858','0');
listsubcat2.addOptions('858|0','<Unfiled>','0');
listsubcat2.setDefaultOption('858|0','0');
listsubcat.addOptions('856','<Unfiled>','0');
listsubcat.setDefaultOption('856','0');
listsubcat2.addOptions('856|0','<Unfiled>','0');
listsubcat2.setDefaultOption('856|0','0');
listsubcat2.addOptions('1075|4450','Student','4451','Veteran','4452','<Unfiled>','0');
listsubcat2.setDefaultOption('1075|4450','4451');
listsubcat.addOptions('1075','Associations','4450','<Unfiled>','0');
listsubcat.setDefaultOption('1075','4450');
listsubcat2.addOptions('1075|0','<Unfiled>','0');
listsubcat2.setDefaultOption('1075|0','0');
listsubcat.addOptions('854','<Unfiled>','0');
listsubcat.setDefaultOption('854','0');
listsubcat2.addOptions('854|0','<Unfiled>','0');
listsubcat2.setDefaultOption('854|0','0');
listsubcat.addOptions('891','<Unfiled>','0');
listsubcat.setDefaultOption('891','0');
listsubcat2.addOptions('891|0','<Unfiled>','0');
listsubcat2.setDefaultOption('891|0','0');
var listbrandname = new DynamicOptionList('brandname','MfgID');
listbrandname.addOptions('2946','Premium','3093');
listbrandname.setDefaultOption('2946','3093');
listbrandname.addOptions('2945','Standard','3092');
listbrandname.setDefaultOption('2945','3092');
      function init() {
      var theform = document.forms[1];
      listsubcat.init(theform);
      listsubcat2.init(theform);
      listbrandname.init(theform);
      }

//Dynamic List Boxes

function checkall() {
frm = document.frmlist;
for (i = 0; i < frm.elements.length; i++) {
if (frm.elements[i].name=='prodid') frm.elements[i].checked = true;
}
}
function clearall() {
frm = document.frmlist;
for (i = 0; i < frm.elements.length; i++) {
if (frm.elements[i].name=='prodid') frm.elements[i].checked = false;
}
}
function resetfrmdetail() {
frm = document.frmdetail;
for (i = 0; i < frm.elements.length; i++) {
if (frm.elements[i].name!='ad') frm.elements[i].value = "";
}
}
function confirmDelete() {
      var x = confirm("WARNING: Once data is deleted it cannot be recovered. Do you wish to continue?");
      if (x)
            {return true;}
      else
            {return false;}
}
function openWinAcc(pid){
var qrystring
qrystring = "http://208.179.4.226/detail_acc.asp?pid="+pid //To be replace by real iv_ManageDomainName in production
child=open(qrystring,"childAcc","scrollbars,width=600,height=428");
}
function checkString(str,valid){
   if (!str) return false;
   // helper function, returns false if any character in string argument is not found in valid argument
   var check = str.split('');
   for(var i = 0; i < check.length; i++) {
      if(valid.indexOf(check[i]) == -1) return false;
   }
   return true;
}
function checknotrequire(str,valid){  
   // helper function, returns false if any character in string argument is not found in valid argument
   var check = str.split('');
   for(var i = 0; i < check.length; i++) {
      if(valid.indexOf(check[i]) == -1) return false;
   }
   return true;
}
function validate(which) {      
  for (i=0;i<which.length;i++) {
    var tempobj=which.elements[i];
      var prefix = tempobj.name.substring(0,3);
      var fieldname = tempobj.name.substring(3,60).toUpperCase();
      
      // Check for Prefix "str"
    if (prefix=="str") {
      if (tempobj.value==""){
        alert(fieldname+" is required!");
        tempobj.focus();
        return false;            
      }
      }
      if (tempobj.name =="strSummary" || tempobj.name=="snrFullStory"){
            if (tempobj.value.length > 7000) {
                   alert(fieldname+" is limited to 7000 characters including spaces, please shorten your text.");
                  tempobj.focus();
        return false;            
            }
      }
      // Check for Prefix "prt"
    if (prefix=="prt") {
      if (!checkString(tempobj.value," abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_()[]\/:&")){ // also test for space
        alert(fieldname+" is invalid. Please check your entry!");
        tempobj.focus();
        return false;            
      }
      }
      // Check for Prefix "pnr"
    if (prefix=="pnr") {
      if (!checknotrequire(tempobj.value," abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_()[]\/:&")){ // also test for space
        alert(fieldname+" is invalid. Please check your entry!");
        tempobj.focus();
        return false;            
      }
      }
      // Check for Prefix "chr"
    if (prefix=="chr") {
      if (!checkString(tempobj.value," abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'")) { // also test for space
        alert(fieldname+" is invalid. Please check your entry!")
        tempobj.focus();
        return false;
      }
      }
      // Check for Prefix "dnr"
    if (prefix=="dnr") {
      if (!checknotrequire(tempobj.value,"0123456789.") || tempobj.value < 0) { // also test for space
        alert(fieldname+" is invalid. Only numbers are allowed and minimum weight is 1")
        tempobj.focus();
        return false;
      }
      }
      
      // Check for Prefix "int"
    if (prefix=="int") {
      if (!checknotrequire(tempobj.value,"0123456789")) { // also test for space
        alert(fieldname+" is invalid. Only numbers are allowed!")
        tempobj.focus();
        return false;
      }
      }
      // Check for Prefix "dec"
    if (prefix=="dec") {
      if (!checkString(tempobj.value,"0123456789.")) { // also test for space
        alert(fieldname+" is invalid. Only integers and decimals are allowed!")
        tempobj.focus();
        return false;
      }
      }
             
  } // end for loop
return true;
}
// This script is intended for use with a minimum of Netscape 4 or IE 4.
            if(document.layers) {var ns4 = true;}
            if(document.all) {var ie4 = true;}
            function showObject(obj) {
                  if (ns4) {obj.visibility = "show";}
                  else if (ie4) {      obj.visibility = "visible";}
                  }
            function hideObject(obj) {
                  if (ns4) {obj.visibility = "hide";}
                  if (ie4) {obj.visibility = "hidden";}
                  }
// -->
</SCRIPT>
<script>
function checkDate(theField){
  dMsg.innerHTML = fDesc;
  fVal = theField.value;
  if(fVal==""){
    return false;
  }
  dPart = (fVal+" ").split(" ")[0].split("/");
  tPart = (fVal+" ").split(" ")[1].split(":");
  mPart = (fVal+" ").split(" ");
  if(!dPart[1] || dPart[1]=="") dPart[1] = 1;
  if(mPart[1] && mPart[1]>"" && dPart[2].length<4){
    dMsg.innerHTML = "<font color=red>Enter Year with four digits.</font><br>"+fDesc;
    return false;
  }
  if(!dPart[2] || dPart[2].length < 4) dPart[2] = 2000;
  if(!tPart[0] || tPart[0]=="") tPart[0] = 0;
  if(!tPart[1] || tPart[1]=="") tPart[1] = 0;
  if(mPart[2] && mPart[2]>"" && tPart[1].length<2){
    dMsg.innerHTML = "<font color=red>Enter Minutes with two digits.</font><br>"+fDesc;
    return false;
  }
  if(!mPart[2] || mPart[2]=="") mPart[2] = "AM";
  if(!mPart[2].match(/^[ap]m?$/i)){
    dMsg.innerHTML = "<font color=red>Use only AM or PM as time suffix.</font><br>"+fDesc;
    return false;
  }
  iDate = new Date(dPart[2], dPart[0]-1, dPart[1]);
  if(dPart[2]!=iDate.getFullYear()||dPart[1]!=iDate.getDate()||dPart[0]!=iDate.getMonth()+1){
    dMsg.innerHTML = "<font color=red>Invalid Date.</font><br>"+fDesc;
    return false;
  }
  hh = tPart[0]*1;
  mm = tPart[1]*1;
  if(hh<0 || hh>12 || mm<0 || mm>59){
    dMsg.innerHTML = "<font color=red>Invalid Time."+hh+":"+mm+"</font><br>"+fDesc;
    return false;
  }
  return (fVal.match(/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}\:\d{2} [ap]m$/i)!=null);
}
var fDesc = "MM/DD/YYYY HH:MM AM|PM";
var dMsg;
function init2(){
  dMsg = document.getElementById('msg');
  dMsg.innerHTML = fDesc;
  document.forms[0].datAirDateTime.focus()
}
</script>
</HEAD>
<BODY onLoad="init();init2();" background="Images_System/bg_wlines.gif" bgColor=white leftMargin="0" rightMargin="0" topMargin="0" marginheight="0" marginwidth="0">
<DIV ID="splashScreen" STYLE="position:absolute;z-index:5;top:30%;left:35%;"></DIV>
<TABLE border="0" cellPadding="0" cellSpacing="0" width="100%">
                    <TR>
                        
                        <!--Left TD-->
                      
<TD><img src="Images_System/de_clear.gif" height="1"  width="6"><TD>      
<TD vAlign=top align="center">            
      
      <!--Logo Section-->  
    <TABLE border="0" cellPadding="0" cellSpacing="0">
              <TR>
                   <TD valign="top">      
                  <img src="Images_System/de_clear.gif" height="3" width="1"><br>
                  <img src="../Images_System/lo.emanager.jpg" alt="" width="180" height="135" border="0">
                  </TD>               
            </TR>
            <tr><TD><img src="Images_System/de_clear.gif" height="13" width="1"><TD></tr>      
      </TABLE>
      <!--/Logo Section-->
      
      <TABLE border="0" cellPadding="0" cellSpacing="0" width="100%">
            <tr bgcolor="#ABD8FF"><td colspan="5"></td></tr>
              <TR>
                  <td bgcolor="#ABD8FF"><img src="Images_System/de_clear.gif" height="1" width="1"></td>
                   <TD  align="center" width="50%"><a href="support.asp?k=a" class="TitleS">Admin</a></TD>
                  <td bgcolor="#ABD8FF"><img src="Images_System/de_clear.gif" height="1" width="1"></td>              
                  <TD bgcolor="#f6f6f6" align="center" width="50%"><a href="support.asp?k=b" class="TitleS">Business</a></TD>  
                  <td bgcolor="#ABD8FF"><img src="Images_System/de_clear.gif" height="1" width="1"></td>             
            </TR>
            <tr bgcolor="#ABD8FF"><td colspan="5"></td></tr>
            <tr><TD colspan="5"><img src="Images_System/de_clear.gif" height="13" width="1"><TD></tr>      
      </TABLE>
      
      <!--Left Menu-->
    <TABLE border="0" cellPadding="0" cellSpacing="0">
        <TR>
            <TD>      
                  
      <!--Site Tools-->            
      
      <!--/Site Tools-->
      
      <!--Business Tools-->
      
      
                  <!--Order Manager-->
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                        
                <TR>
                              <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                        <TD width="100%"><A class="NavLeft" href="adm_orders.asp?k=bom">&nbsp;&nbsp;Order Manager</A></TD>                                            
                        </TR>                        
                  </TABLE>                  
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180">                  
                        
                        <tr>
                              <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                              <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                        </tr>
                  </TABLE>
                  <!--/Order Manager-->
                        
                  <!--Inventory Manager-->            
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                        
                <TR>
                              <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                        <TD width="100%"><A class="NavLeft" href="adm_catmgr.asp?k=bim&v=5">&nbsp;&nbsp;Inventory Manager</A></TD>                                            
                        </TR>                        
                  </TABLE>                  
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180">                        
                        
                        
                        <tr>
                              <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                              <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                        </tr>
                  </TABLE>
                  <!--/Inventory Manager-->
                  
                  <!--Article Manager-->      
                  
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                        
                <TR>
                              <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                        <TD width="100%"><A class="NavLeft" href="adm_article.asp?k=bam">&nbsp;&nbsp;Article Manager</A></TD>                                            
                        </TR>                        
                  </TABLE>                  
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180">                        
                        
                        <tr>
                              <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                              <td height="6" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                        </tr>            
                              <tr><td align="right"></td><td bgcolor="#f5f5f5">&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<A class="small" href="adm_article_catmgr.asp?k=bam">Categories Tree</A></tr>                        
                              <tr><td align="right"><strong>&#187;</strong></td><td bgcolor="#f5f5f5">&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<A class="small" href="adm_article.asp?k=bam">Add New Articles</A></tr>      
                              <tr><td align="right"></td><td bgcolor="#f5f5f5">&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<A class="small" href="adm_article_edit.asp?k=bam">Edit Articles</A></tr>      
                              <tr><td align="right"></td><td bgcolor="#f5f5f5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-<A class="small" href="adm_article_feature.asp?k=bam">Cover Feature</A></tr>            
                              <tr><td align="right"></td><td bgcolor="#f5f5f5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-<A class="small" href="adm_article_feature.asp?k=bam&rt=n">Category Features</A></tr>      
      
                        
                        
                        <tr>
                              <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                              <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                        </tr>
                  </TABLE>
                  
                  <!--/Article Manager-->
                  
                  <!--Promotion Manager-->
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                        
                <TR>
                              <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                        <TD width="100%"><A class="NavLeft" href="adm_promomgr.asp?k=bpm">&nbsp;&nbsp;Promotion Manager</A></TD>                                            
                        </TR>                        
                  </TABLE>                  
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180">                        
                        
                        <tr>
                              <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                              <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                        </tr>
                  </TABLE>
                  <!--/Promotion Manager-->
                  
                  <!--User Manager-->
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                        
                <TR>
                              <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                        <TD width="100%"><A class="NavLeft" href="adm_usrmgr.asp?k=bum">&nbsp;&nbsp;User Manager</A></TD>                                            
                        </TR>                        
                  </TABLE>
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180">                        
                        
                        <tr>
                              <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                              <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                        </tr>
                  </TABLE>
                  <!--User Manager-->
      
                  <!--Campaign Manager-->
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                        
                <TR>
                              <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                        <TD width="100%"><A class="NavLeft" href="#">&nbsp;&nbsp;Campaign Manager</A></TD>                                            
                        </TR>                        
                  </TABLE>
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180">      
                        
                        
                        
                        <tr>
                              <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                              <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                        </tr>
                        
                  </TABLE>
                  
                  <!--/Campaign Manager-->
                  
                  <!--Reporting Manager-->
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                        
                <TR>
                              <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                        <TD width="100%"><A class="NavLeft" href="http://www.vabc.com/reports_stats/index.html">&nbsp;&nbsp;Reporting Manager</A></TD>                                            
                        </TR>                        
                  </TABLE>
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="180">            
                  
                              
                        
                        <tr>
                              <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                              <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                        </tr>
                  </TABLE>
                  <!--/Reporting Manager-->
                        
      <!--/Business Tools-->
                  
      <!--/Left Menu-->                              
            
                                    
                  </TD>
            </TR>            
      </TABLE>
</TD>
                        <!--/Left TD-->
                        
                        <!--Middel TD-->
                    <TD align=left valign=top width=100%>
                              
                              <!--Top Menu-->
                        
<TABLE border="0" cellPadding="0" cellSpacing="0" height="18" width="100%">
   <TR>
               <!--doted line-->
            <TD><img src="Images_System/de_clear.gif" height="1"  width="8"><TD>
               <TD height="38" valign="top" width="1" background="Images_System/de_vdotlow.gif"><img src="Images_System/de_dotlow.gif" height="18" width="1"><br><img src="Images_System/de_dotbase.gif" height="18" width="1"><TD>
          <TD><img src="Images_System/de_clear.gif" height="1"  width="15"><TD>
            <!--/doted line-->
            
            <TD align="left" valign="top" width="100%">                                    
                     <TABLE  bgColor="#000000" border="0" cellpadding="0" cellspacing="0" height="18" width="100%">
                       <TR>
                              <td>
                                    <TABLE  border="0" cellpadding="0" cellspacing="0" height="18">
                                          <tr>
                                           <TD align=middle width="70" bgcolor="#cc0000"><A class="TitleSL" href="default.asp">Home</A></TD>      
                                                <TD>&nbsp;&nbsp;&nbsp;&nbsp;<A class="TitleSL" href="support.asp?k=b">eManager Home</A></TD>                                           
                                          </tr>
                                    </table>
                              </td>
                              <td class="TitleSL" nowrap align="right">VABC.COM <strong>&#187;</strong> Binh Le  | <A class="TitleSL" href="logout.asp?k=bam&v=5">Logout</A>&nbsp;&nbsp;</td>
                        </TR>                                                      
                  </TABLE>      
                  
                  <TABLE border="0" cellpadding="0" cellspacing="0" width="100%" height="28">
                  <tr>
                        <td class="DomainHead" valign="bottom" height="28" style="color:#999999">Welcome</td>                        
                        <td valign="bottom" style="margin-bottom:0px;padding-bottom:0px;line-height:100%;" align="right">
                              <A href="adm_publish_exe.asp" style="color:#CC0000; font-weight:bold; text-decoration: underline;">» PUBLISH</A>&nbsp;&nbsp;<a href="/adm_article.asp?k=bam&v=5&iv_nsid=1" class="TitleS" style="color:#CC0000">News</a>&nbsp;|&nbsp;<a href="/adm_article.asp?k=bam&v=5&iv_nsid=2" class="TitleS" >Store</a>&nbsp;
                        </td>
                        <td class="DomainHead" valign="bottom" height="28" align="right"></td>
                  </tr>      
                  <tr bgcolor="#cccccc"><TD colspan="3"><img src="Images_System/de_clear.gif" height="1"  width="15"><TD></tr>
                  </table>                        
            </TD>
      </TR>                                    
</TABLE>


                              <!--/Top Menu-->
                              
                        <TABLE border="0" cellPadding="0" cellSpacing="0" width="100%">
                                    <!--doted line-->
                                          <TD><img src="Images_System/de_clear.gif" height="1"  width="8"><TD>                              
                                          <TD background="Images_System/de_vdotlow.gif"><IMG src="Images_System/de_clear.gif" height="1"  width="1" border="0"></TD>
                                          <TD><IMG src="Images_System/de_clear.gif" height="1"  width="15" border="0"></TD>
                                          <!--/doted line-->
                                          
                                          <!--Left Mid TD-->
                                  <TD valign="top" width="100%">
                                          <TABLE border="0" cellpadding="0" cellSpacing="0" width="100%">
                                                <tr><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="10" border="0"></td><tr>
                                                
                                                <tr>
                                                      <td><img src="Images_System/de_clear.gif" width="10" height="10" border="0"></td>
                                                      <td width="50%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                                                      <td><img src="Images_System/de_clear.gif" width="10" height="10" border="0"></td>
                                                      <td width="50%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                                                      <td><img src="Images_System/de_clear.gif" width="10" height="10" border="0"></td>
                                                <tr>
                                                <!--************* Template Top Ends **************-->
                                                
                                                <tr>      
                                                <td>&nbsp;</td>                                                
                                                <!--Product Listing-->
                                                <td valign="top">                                                
                                                      <table border="0" cellpadding="0" cellspacing="0" width="100%">      
                                                      <tr><td bgcolor="#cccccc" colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>
                                                      <Form name="frmlist" action="adm_article.asp?k=bam&v=5&cp=1" method="post">      
                                                      <tr>
                                                            <td colspan="3">
                                                                  <table border="0" cellpadding="0" cellspacing="0" width="100%">      
                                                                  <tr>
                                                                        <td colspan="2"><input type="button" value="Check All" class="ButtonR" onclick="checkall();"><input type="button" value="Uncheck All" class="ButtonR" onclick="clearall();"></td>
                                                                        <td align="right"><input type="submit" name="al" value="Delete" class="ButtonR"  onclick="return confirmDelete();"><input type="submit" name="al" value="Activate" class="ButtonR"></td>
                                                                  </tr>      
                                                                  </table>
                                                            </td>
                                                      </tr>
                                                      <tr><td  bgcolor="#cccccc" colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>
                                                      <tr>
                                                            <td bgcolor="#cccccc"><img src="Images_System/de_clear.gif" width="1" height="452" border="0"></td>
                                                            <Td valign="top" width="100%">                                                      
                                                                  <table border="0" cellpadding="0" cellspacing="0" width="100%">      
                                                                                                                                                                                                
                                                                                                                  
                                                                        <tr><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="5" border="0"></td><tr>                                                
                                                                                                                              
                                                                        <tr valign="bottom" bgcolor="#0A50A1">
                                                                              <td class="TitleL">&nbsp;</td>
                                                                              <td class="TitleL">ArticleID&nbsp;&nbsp;</td>
                                                                              <td class="TitleL">Headline</td>            
                                                                              <td class="TitleL">&nbsp;</td>            
                                                                              <td class="TitleL">&nbsp;</td>                                                
                                                                        </tr>      
                                                                        <tr bgcolor="#000000"><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>      
                                                                        <tr><td colspan="5" height="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>      
                                                                        <tr>
                                                                              <td class="small" nowrap>&nbsp;Sort By:&nbsp;</td>
                                                                              <td class="TitleL" colspan="3">
                                                                              <select name="sb" class="frmText">
                                                                                    <option value="Stock" >ArchiveID#</option>
                                                                                    <option value="Brand" >Subscription</option>
                                                                              </select>
                                                                              <select name="so" class="frmText">
                                                                                    <option value="ASC" >A-Z</option>
                                                                                    <option value="DESC" >Z-A</option>
                                                                              </select>
                                                                              <input type="image" name="a" src="Images_System/btn_go.gif" alt="" width="32" height="25" border="0" align="absmiddle">
                                                                              </td>                                                                                                                  
                                                                        </tr>      
                                                                        <tr><td colspan="5" height="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>      
                                                                        <tr bgcolor="#cccccc"><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>      
                                                                        
                                                                        <!--Paging -->
                                                                                    
                                                                        <tr><td colspan="5" height="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>      
                                                                        <tr>                                                                              
                                                                              <td colspan="2" valign="middle" class="small">&nbsp;Page 1/1&nbsp;-&nbsp;1&nbsp;</td>                              
                                                                              <td colspan="2" valign="middle" align="right">
                                                                                    <table cellpadding="0" cellspacing="0" border="0" width="200">                                                
                                                                                          <tr><td colspan="3" height="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>      
                                                                                          <tr>
                                                                                                <td colspan="3" align="center">
                                                                                                      <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                                                                                      <tr>
                                                                                                            
                                                                                                            <td align="center"><img src="Images_System/ico_previousset_off.gif" width="28" height="17" border="0"></td>
                                                                                                            
                                                                                                            <td align="center"><img src="Images_System/ico_previouspage_off.gif" width="28" height="17" border="0" hspace="3"></td>
                                                                                                            
                                                                                                                        <td width="10%" align="center" valign="middle" class='PagingNavTxtOnSelected'><a href='adm_article.asp?cp=1&pid=82595&k=bam&v=5&sb=&so=' class='PagingNavTxtOn'>1</a></td>                                                                        
                                                                                                            
                                                                                                                        <td width="10%" align="center" valign="middle" >2</td>                                                                        
                                                                                                            
                                                                                                                        <td width="10%" align="center" valign="middle" >3</td>                                                                        
                                                                                                            
                                                                                                                        <td width="10%" align="center" valign="middle" >4</td>                                                                        
                                                                                                            
                                                                                                                        <td width="10%" align="center" valign="middle" >5</td>                                                                        
                                                                                                            
                                                                                                            <td align="center"><img src="Images_System/ico_nextpage_off.gif" width="28" height="17" border="0" hspace="3"></td>
                                                                                                            
                                                                                                            <td align="center"><img src="Images_System/ico_nextset_off.gif" width="28" height="17" border="0"></td>
                                                                                                                                                                                                      
                                                                                                      </tr>
                                                                                                </table>                                                                              
                                                                                                </td>                                                                        
                                                                                          </tr>                                                            
                                                                                    </table>
                                                                              </td>
                                                                        </tr>
                                                                        <tr><td colspan="5" height="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>      
                                                                        <tr bgcolor="#cccccc"><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>      
                                                                        
                                                                        <!--/Paging-->
                                                                                                                  
                                                                        <tr><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>                                                                                                                              
                                                                        
                                                                        
                                                                        <tr><td colspan="5" height="25" class="TitleS" style="color:#cc0000; padding-left: 3 px; padding-right: 3 px">Remember to activate the below newly added articles.</td></tr>
                                                                              
                                                                                    <tr bgcolor="#e6e6e6">
                                                                                          <td><input type="checkbox" name="prodid" value="82595" class="frmText"></td>
                                                                                          <td nowrap><a href="adm_article.asp?k=bam&v=5&pid=82595&cp=1&sb=&so=" style="font-size:10px;" class="regular">1009</a><img src="Images_System/de_clear.gif" alt="" width="5" height="1" border="0"></td>
                                                                                          <td nowrap>Headline</td>
                                                                                          <td><a href="adm_article.asp?k=bam&v=5&pid=82595&mpid=82595&cp=1&sb=&so=" class="TitleS"><img src="Images_System/ico_sub.gif" alt="" width="26" height="16" border="0"></a></td>
                                                                                          <td nowrap><a href="#" onclick="openWinAcc(82595)"><img src="Images_System/ico_preview.gif.gif" alt="" width="16" height="15" border="0"></a></td>
                                                                                    </tr>      
                                                                                                                        
                                                                        <tr><td height="18" colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>                                                                                                                  
                                                                  </table>
                                                            </TD>
                                                            <td bgcolor="#cccccc"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                                                      </tr>
                                                      <tr><td bgcolor="#cccccc" colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>
                                                      <tr>
                                                            <td colspan="3">
                                                                  <table border="0" cellpadding="0" cellspacing="0" width="100%">      
                                                                  <tr>
                                                                        <td colspan="2"><input type="button" value="Check All" class="ButtonR" onclick="checkall();"><input type="button" value="Uncheck All" class="ButtonR" onclick="clearall();"></td>
                                                                        <td align="right"><input type="submit" name="al" value="Delete" class="ButtonR"  onclick="return confirmDelete();"><input type="submit" name="al" value="Activate" class="ButtonR"></td>
                                                                  </tr>      
                                                                  </table>
                                                            </td>
                                                      </tr>
                                                      <tr><td bgcolor="#cccccc" colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>
                                                      </form>
                                                      </table>                                                
                                                </td>
                                                <!--/Product Listing-->            
                                                
                                                <!--Product Details-->            
                                                <td>&nbsp;</td>
                                                <td valign="top">
                                                <table bgcolor="#e6e6e6" border="0" cellpadding="0" cellspacing="0">                                                
                                                <Form name="frmdetail" action="adm_article.asp?k=bam&v=5&pid=82595&cp=1&sb=&so=&mpid=0" method="post" onSubmit="return validate(this);return checkDate(document.forms[0].datAirDateTime)">      
                                                <tr bgcolor="#cccccc"><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>            
                                                <tr bgcolor="#FFFFFF">
                                                      <td bgcolor="#cccccc" rowspan="36"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                                                      <td colspan="2"><input type="button" name="ad" onclick="resetfrmdetail();" value="Clear All" class="ButtonR"></td>
                                                      <td align="right"><input type="submit" name="ad" value="Update" class="ButtonR">&nbsp;&nbsp;<input type="submit" name="ad" value="Add" class="ButtonR"></td>
                                                      <td bgcolor="#cccccc" rowspan="36"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                                                </tr>            
                                                <tr bgcolor="#cccccc"><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>            
                                                                                    
                                                <tr bgcolor="#FFFFFF"><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="4" border="0"></td><tr>      
                                                                                          
                                                <tr valign="bottom" bgcolor="#333333"><td class="TitleL" colspan="3">&nbsp;Edit Article "1009"</td></tr>
                                                
                                                <tr><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="5" border="0"></td><tr>      
                                                <tr >
                                                      <td style="color: #000000" class="TitleS" colspan="2">&nbsp;ArchiveID:</td>
                                                      <td><input maxlength="50" type="text" name="strArchiveID" value="1009" class="frmText" style="width:175;">&nbsp;</td>
                                                </tr>                  
                                                <tr >
                                                      <td style="color: #000000" class="TitleS" colspan="2" valign="top">&nbsp;Air Date Time:</td>
                                                      <td>
                                                            <input maxlength="50" type="text" name="datAirDateTime" value="12/23/2003 1:23:00 AM" class="frmText" style="width:175;" onKeyUp="checkDate(this)">
                                                            <div id="msg" style="font-size:7pt;"></div></td>
                                                </tr>                                          
                                                <tr>
                                                      <td colspan="2" class="TitleS" style="color: #000000;">&nbsp;Language:</td>
                                                      <td style="padding-top:5px;">
                                                      <select name="Language" class="frmText" style="width:175;">
                                                            <option value="1" SELECTED>English</option>      
                                                            <option value="2" >Vietnamese</option>      
                                                      </select>                                                      
                                                      </td>
                                                </tr>
                                                <tr >
                                                      <td colspan="2">&nbsp;Lang2 AID:</td>
                                                      <td>
                                                            <input maxlength="20" type="text" name="Custom1" value="" class="frmText" style="width:175;">
                                                            (ArchiveID)
                                                      </td>
                                                </tr>                                    
                                                <tr >
                                                      <td class="TitleS">&nbsp;<a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000">L1 Main Cat</a></td>
                                                      <td><a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000"><img src="Images_System/ico_edit.gif" alt="" width="12" height="12" vspace="2" border="0" align="middle"></a></td>
                                                      <td>
                                                      <select name="cat" id="cat" class="frmText" style="width:175;" onChange="listsubcat.populate();listsubcat2.populate();">
                                                            
                                                                              <option value="868" SELECTED>Community Health</option>
                                                            
                                                                              <option value="1041" >Econony Exchange</option>
                                                            
                                                                              <option value="863" >Education</option>
                                                            
                                                                              <option value="858" >Entertainment</option>
                                                            
                                                                              <option value="856" >US</option>
                                                            
                                                                              <option value="1075" >Vietnamese Community</option>
                                                            
                                                                              <option value="854" >Weather</option>
                                                            
                                                                              <option value="891" >World</option>
                                                                                                                                    
                                                      </select>
                                                      </td>
                                                </tr>
                                                <tr>
                                                      <td class="TitleS">&nbsp;<a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000">L2 Sub Cat</a></td>
                                                      <td><a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000"><img src="Images_System/ico_edit.gif" alt="" width="12" height="12" vspace="2" border="0" align="middle"></a></td>
                                                      <td>
                                                      
                                                      <select name="subcat" id="subcat" class="frmText" style="width:175;" onChange="listsubcat2.populate();">                                                                              
                                                            
                                                            <SCRIPT LANGUAGE="JavaScript">listsubcat.printOptions()</SCRIPT>      
                                                                                                                        
                                                      </select>                                                                                                
                                                      </td>
                                                </tr>
                                                <tr>
                                                      <td class="TitleS">&nbsp;<a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000">L3 Sub Cat</a></td>
                                                      <td><a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000"><img src="Images_System/ico_edit.gif" alt="" width="12" height="12" vspace="2" border="0" align="middle"></a></td>
                                                      <td>
                                                      <select name="subcat2" id="subcat2" class="frmText" style="width:175;">            
                                                                                                                              
                                                            <SCRIPT LANGUAGE="JavaScript">listsubcat2.printOptions()</SCRIPT>      
                                                                                                                                          
                                                      </select>                                                                                                
                                                      </td>
                                                </tr>
                                                <tr>
                                                      <td class="TitleS">&nbsp;<a href="adm_mfgmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000">Subsription</a></td>
                                                      <td><img src="Images_System/de_clear.gif" alt="" width="12" height="12" vspace="2" border="0" align="middle"></td>
                                                      <td>
                                                      <select name="MfgID" id="MfgID" class="frmText" style="width:175;" onChange="listbrandname.populate();">
                                                            
                                                                              <option value="2946" SELECTED>Premium</option>
                                                            
                                                                              <option value="2945" >Standard</option>
                                                                                                                              
                                                      </select>
                                                      </td>
                                                </tr>
                                                                                                
                                                  <tr >
                                                      <td class="TitleS">&nbsp;<a href="adm_mfgmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000">Subscr.Level</a>&nbsp;</td>
                                                      <td><img src="Images_System/de_clear.gif" alt="" width="12" height="12" vspace="2" border="0" align="middle"></td>
                                                      <td>
                                                      <select name="brandname" id="brandname" class="frmText" style="width:175;">            
                                                                                                             
                                                                  <SCRIPT LANGUAGE="JavaScript">listbrandname.printOptions()</SCRIPT>      
                                                                  
                                                      </select>                        
                                                      </td>
                                                </tr>
                                                <tr><td><img src="Images_System/de_clear.gif" alt="" width="1" height="16" border="0"></td></tr>
                                                <tr >
                                                      <td class="TitleS" style="color: #000000" colspan="2">&nbsp;Headline:</td>
                                                      <td><input maxlength="200" type="text" name="strHeadline" value="Headline" class="frmText" style="width:350;"></td>
                                                </tr>
                                                <tr >
                                                      <td class="TitleS" style="color: #000000" colspan="2">&nbsp;By Author:</td>
                                                      <td><input maxlength="50" type="text" name="strAuthor" value="Athor" class="frmText" style="width:350;"></td>
                                                </tr>                                                      
                                                <tr >
                                                      <td valign="top" class="TitleS" style="color: #000000" colspan="2">&nbsp;Summary:<br><em style="color:#000000;font-size:10;font-weight : normal;line-height:120%;">
                                                      &nbsp;&nbsp;&nbsp;&nbsp;7000 chars<br>
                                                      &nbsp;&nbsp;&nbsp;&nbsp;maximum<br>
                                                      &nbsp;&nbsp;&nbsp;&nbsp;including<br>
                                                      &nbsp;&nbsp;&nbsp;&nbsp;spaces</em></td>
                                                      <td>
                                                      <textarea cols="20" rows="8" name="strSummary" class="frmText" style="width:350;">summary</textarea>
                                                      </td>
                                                </tr>
                                                <tr>
                                                      <td valign="top" style="color: #000000" colspan="2">&nbsp;Full Story:<br><em style="color:#000000;font-size:10;font-weight : normal;line-height:120%;">
                                                      &nbsp;&nbsp;&nbsp;&nbsp;7000 chars<br>
                                                      &nbsp;&nbsp;&nbsp;&nbsp;maximum<br>
                                                      &nbsp;&nbsp;&nbsp;&nbsp;including<br>
                                                      &nbsp;&nbsp;&nbsp;&nbsp;spaces</em></td>
                                                      <td>
                                                      <textarea cols="20" rows="24" name="snrFullStory" class="frmText" style="width:350;">Full story</textarea>
                                                      </td>
                                                </tr>
                                                <tr >
                                                      <td colspan="2">&nbsp;Img Sub-Title:</td>
                                                      <td><input maxlength="200" type="text" name="Sizes" value="" class="frmText" style="width:350;"></td>
                                                </tr>      
                                                <tr >
                                                      <td colspan="2" valign="top">&nbsp;Video &nbsp;Description:</td>
                                                      <td>
                                                      <textarea cols="20" rows="7" name="Custom4" class="frmText" style="width:350;"></textarea>
                                                      </td>
                                                </tr>
                                                <tr >
                                                      <td colspan="2">&nbsp;Video Time:</td>
                                                      <td>
                                                            <input maxlength="200" type="text" name="Custom2" value="" class="frmText" style="width:175;">
                                                            (i.e. 00:15:20)
                                                      </td>
                                                </tr>                                                
                                                <tr >
                                                      <td colspan="2">&nbsp;Places:</td>
                                                      <td><input maxlength="200" type="text" name="Colors" value="" class="frmText" style="width:350;"></td>
                                                </tr>
                                                <tr >
                                                      <td colspan="2">&nbsp;Personality:</td>
                                                      <td><input maxlength="200" type="text" name="Custom3" value="" class="frmText" style="width:350;"></td>
                                                </tr>                        
                                                
                                                <tr><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="5" border="0"></td><tr>            
                                                <tr><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="5" border="0"></td><tr>            
                                                <tr bgcolor="#cccccc"><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>      
                                                <tr bgcolor="#FFFFFF">      
                                                      <td colspan="2"><input type="button" name="ad" onclick="resetfrmdetail();" value="Clear All" class="ButtonR"></td>
                                                      <td align="right"><input type="submit" name="ad" value="Update" class="ButtonR">&nbsp;&nbsp;<input type="submit" name="ad" value="Add" class="ButtonR"></td>
                                                </tr>
                                                <tr bgcolor="#cccccc"><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>            
                                                
                                                </table>
                                                </td>
                                                <td>&nbsp;</td>
                                                <!--/Product Details-->
                                                </tr>            
                                                
                                                <!--************* Template Bottom Starts**************-->            
                                                                                                            
                                          </table>
                                          </td>  
                                          <!--/Right Mid TD-->              
                                     </TR>                   
                                </TABLE>
                    </TD>
                    <!--/Middel TD-->
                  </TR>      
                  <tr><td height="12" olspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>                  
                  <!--doted line-->
                  <tr bgcolor="#ABD8FF">
                        <td colspan="3" >&nbsp;</td>
                        <td><TABLE bgcolor="#ABD8FF" WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0" height="60">
<tr>
<!--doted line-->
<TD><img src="../Images_System/de_clear.gif" height="1"  width="8"><TD>
<TD height="38" valign="top" width="1" background="Images_System/de_vdotlow.gif"><img src="../Images_System/de_clear.gif" height="18" width="1"><TD>
<TD><img src="../Images_System/de_clear.gif" height="1"  width="5"><TD>
<!--/doted line-->

<td><a href="https://www.thawte.com/cgi/server/certdetails.exe?code=USMEGA50" target="new"><img src="../Images_System/ico_thawte.gif" alt="" width="47" height="30" border="0" hspace="10"></a></td>
<td width="100%" valign="middle">
      <table cellpadding="0" cellspacing="0" border="0">
            <TR>                  
                  <TD height="18" valign="top">
                  <a href="doc.asp?d=privacypolicy" class="Small">Privacy Policy</a>&nbsp;|&nbsp;
                  <a href="doc.asp?d=useragreement" class="Small">Terms of Use</a>
                  </TD>
            </TR>
            <TR>                  
                  <TD height="18" valign="top" class="small">                  
                  ©2001-2003&nbsp;www.megaleap.com. All rights reserved.
                  </TD>
            </TR>
      </table>
</td>
</tr>
</TABLE>
</td>
                  </tr>      
                  <!--/doted line-->                
            </TABLE>

</BODY>
</HTML>
 
0
andreni78
Asked:
andreni78
  • 12
  • 7
  • 3
  • +2
2 Solutions
 
andreni78Author Commented:
And this is the Javascript link file for this line:
<SCRIPT LANGUAGE="JavaScript" SRC="javascripts/DynamicOptionList.js"></SCRIPT>




// Author: Matt Kruse <matt@mattkruse.com>
// WWW: http://www.mattkruse.com/
function DynamicOptionList() {
      if (arguments.length < 2) { alert("Not enough arguments in DynamicOptionList()"); }
      this.target = arguments[0];
      this.dependencies = new Array();
      for (var i=1; i<arguments.length; i++) {
            this.dependencies[this.dependencies.length] = arguments[i];
            }
      this.form = null;
      this.dependentValues = new Object();
      this.defaultValues = new Object();
      this.options = new Object();
      this.delimiter = "|";
      this.longestString = "";
      this.numberOfOptions = 0;
      this.addOptions = DynamicOptionList_addOptions;
      this.populate = DynamicOptionList_populate;
      this.setDelimiter = DynamicOptionList_setDelimiter;
      this.setDefaultOption = DynamicOptionList_setDefaultOption;
      this.printOptions = DynamicOptionList_printOptions;
      this.init = DynamicOptionList_init;
      }
function DynamicOptionList_setDelimiter(val) {
      this.delimiter = val;
      }
function DynamicOptionList_setDefaultOption(condition, val) {
      this.defaultValues[condition] = val;
      }
function DynamicOptionList_init(theform) {
      this.form = theform;
      this.populate();
      }
function DynamicOptionList_addOptions(dependentValue) {
      if (typeof this.options[dependentValue] != "object") { this.options[dependentValue] = new Array(); }
      for (var i=1; i<arguments.length; i+=2) {
            if (arguments[i].length > this.longestString.length) {
                  this.longestString = arguments[i];
                  }
            this.numberOfOptions++;
            this.options[dependentValue][this.options[dependentValue].length] = arguments[i];
            this.options[dependentValue][this.options[dependentValue].length] = arguments[i+1];
            }
      }
function DynamicOptionList_printOptions() {
    if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) <= 4)){
            var ret = "";
            for (var i=0; i<this.numberOfOptions; i++) {
                  ret += "<OPTION>";
                  }
            ret += "<OPTION>"
            for (var i=0; i<this.longestString.length; i++) {
                  ret += "_";
                  }
            document.writeln(ret);
            }
      }
function DynamicOptionList_populate() {
      var theform = this.form;
      var i,j,obj,obj2;
      this.dependentValues = new Object;
      var dependentValuesInitialized = false;
      for (i=0; i<this.dependencies.length;i++) {
            var sel = theform[this.dependencies[i]];
            var selName = sel.name;
            if (!dependentValuesInitialized) {
                  dependentValuesInitialized = true;
                  for (j=0; j<sel.options.length; j++) {
                        if (sel.options[j].selected) {
                              this.dependentValues[sel.options[j].value] = true;
                              }
                        }
                  }
            else {
                  var tmpList = new Object();
                  var newList = new Object();
                  for (j=0; j<sel.options.length; j++) {
                        if (sel.options[j].selected) {
                              tmpList[sel.options[j].value] = true;
                              }
                        }
                  for (obj in this.dependentValues) {
                        for (obj2 in tmpList) {
                              newList[obj + this.delimiter + obj2] = true;
                              }
                        }
                  this.dependentValues = newList;
                  }
            }

      var targetSel = theform[this.target];
      var targetSelected = new Object();
      for (i=0; i<targetSel.options.length; i++) {
            if (targetSel.options[i].selected) {
                  targetSelected[targetSel.options[i].value] = true;
                  }
            }
      targetSel.options.length = 0; // Clear all target options            
      for (i in this.dependentValues) {
            if (typeof this.options[i] == "object") {
                  var o = this.options[i];
                  for (j=0; j<o.length; j+=2) {
                        var text = o[j];
                        var val = o[j+1];
                        targetSel.options[targetSel.options.length] = new Option(text, val, false, false);
                        if (this.defaultValues[i] == val) {
                              targetSelected[val] = true;
                              }
                        }
                  }
            }
      targetSel.selectedIndex=-1;      
      for (i=0; i<targetSel.options.length; i++) {
            if (targetSelected[targetSel.options[i].value] != null && targetSelected[targetSel.options[i].value]==true) {
                  targetSel.options[i].selected = true;
                  }
            }
      }
0
 
NushiCommented:
where is that file.

<SCRIPT LANGUAGE="JavaScript" SRC="javascripts/DynamicOptionList.js"></SCRIPT>

Nushi.
0
 
NushiCommented:
i cant create the object DynamicOptionList(...)
post the js file or referance to a web where i can download it.


Nushi.
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
ZontarCommented:
ANytime you've got that much repetitive code, it's time to start storing the data in structures like arrays, then looping through the arrays making your function calls there.
0
 
Michel PlungjanIT ExpertCommented:
You use
  document.forms[0].datAirDateTime.focus()
but that field is in forms[1]
  document.forms[1].datAirDateTime.focus()

Michel
0
 
Michel PlungjanIT ExpertCommented:
You also have
onSubmit="return validate(this);return checkDate(document.forms[0].datAirDateTime)"
which only will validate the form and not do the checkdate which also uses the wrong form.
I would put the checkDate in the validate

0
 
Michel PlungjanIT ExpertCommented:
So change the end of validate from

  } // end for loop
return true;
}

to

  } // end for loop
  return checkDate(document.forms[1].datAirDateTime)
}


and change
onSubmit="return validate(this);return checkDate(document.forms[0].datAirDateTime)"
to
onSubmit="return validate(this)"
0
 
Michel PlungjanIT ExpertCommented:
you can even use
  return checkDate(which.datAirDateTime)
0
 
Michel PlungjanIT ExpertCommented:
If you are unhappy about the validate, I think Zontar is too much of a purist here.
It is a LOT easier for a non-js expert to repeat a section than to create new arrays.
I would even go as far as to simply run over the complete form field by field and NOT use the loop just to save typing
0
 
Michel PlungjanIT ExpertCommented:
Sorry for the many posts: My concern is the size and complexity of your form. Seems you need a wizard more than a HUGE do everything form

Michel
0
 
ZontarCommented:
>  If you are unhappy about the validate, I think Zontar is too much of a purist here.

Well, it's not any ideological bias I might have -- I'm just lazy, and using a well-organised data structure gives me more time to harrass people on Web boards and watch bad cops shows on the telly. <G>

The fact that I'm a bit of an SQL-head may have something to do with it also.

The problem with repetitive code is that it very quickly becomes difficult to maintain.
0
 
ZontarCommented:
Good call on figuring out what was returning where, BTW. I looked at that and went, "Gaaahhh! There's too much code! Time for some arrays!" ;^)
0
 
NetGrooveCommented:
Hello Andre,

you did not mention seconds in the time validation request.

Here the corrected version:

<!--************* Template Top Starts **************-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE></TITLE>
<LINK href="Includes/styles.css" rel=stylesheet type=text/css>
<SCRIPT LANGUAGE="JavaScript" SRC="javascripts/DynamicOptionList.js"></SCRIPT>
<script language="javascript">
<!--
//Dynamic List Boxes 3 steps: 1.construct as below, 2.function init(), 3.body onload="init()"
var listsubcat = new DynamicOptionList('subcat','cat');
var listsubcat2 = new DynamicOptionList('subcat2','cat','subcat');
listsubcat.addOptions('868','<Unfiled>','0');
listsubcat.setDefaultOption('868','0');
listsubcat2.addOptions('868|0','<Unfiled>','0');
listsubcat2.setDefaultOption('868|0','0');
listsubcat.addOptions('1041','<Unfiled>','0');
listsubcat.setDefaultOption('1041','0');
listsubcat2.addOptions('1041|0','<Unfiled>','0');
listsubcat2.setDefaultOption('1041|0','0');
listsubcat.addOptions('863','<Unfiled>','0');
listsubcat.setDefaultOption('863','0');
listsubcat2.addOptions('863|0','<Unfiled>','0');
listsubcat2.setDefaultOption('863|0','0');
listsubcat.addOptions('858','<Unfiled>','0');
listsubcat.setDefaultOption('858','0');
listsubcat2.addOptions('858|0','<Unfiled>','0');
listsubcat2.setDefaultOption('858|0','0');
listsubcat.addOptions('856','<Unfiled>','0');
listsubcat.setDefaultOption('856','0');
listsubcat2.addOptions('856|0','<Unfiled>','0');
listsubcat2.setDefaultOption('856|0','0');
listsubcat2.addOptions('1075|4450','Student','4451','Veteran','4452','<Unfiled>','0');
listsubcat2.setDefaultOption('1075|4450','4451');
listsubcat.addOptions('1075','Associations','4450','<Unfiled>','0');
listsubcat.setDefaultOption('1075','4450');
listsubcat2.addOptions('1075|0','<Unfiled>','0');
listsubcat2.setDefaultOption('1075|0','0');
listsubcat.addOptions('854','<Unfiled>','0');
listsubcat.setDefaultOption('854','0');
listsubcat2.addOptions('854|0','<Unfiled>','0');
listsubcat2.setDefaultOption('854|0','0');
listsubcat.addOptions('891','<Unfiled>','0');
listsubcat.setDefaultOption('891','0');
listsubcat2.addOptions('891|0','<Unfiled>','0');
listsubcat2.setDefaultOption('891|0','0');
var listbrandname = new DynamicOptionList('brandname','MfgID');
listbrandname.addOptions('2946','Premium','3093');
listbrandname.setDefaultOption('2946','3093');
listbrandname.addOptions('2945','Standard','3092');
listbrandname.setDefaultOption('2945','3092');
     function init() {
     var theform = document.forms[1];
     listsubcat.init(theform);
     listsubcat2.init(theform);
     listbrandname.init(theform);
     }

//Dynamic List Boxes

function checkall() {
frm = document.frmlist;
for (i = 0; i < frm.elements.length; i++) {
if (frm.elements[i].name=='prodid') frm.elements[i].checked = true;
}
}
function clearall() {
frm = document.frmlist;
for (i = 0; i < frm.elements.length; i++) {
if (frm.elements[i].name=='prodid') frm.elements[i].checked = false;
}
}
function resetfrmdetail() {
frm = document.frmdetail;
for (i = 0; i < frm.elements.length; i++) {
if (frm.elements[i].name!='ad') frm.elements[i].value = "";
}
}
function confirmDelete() {
     var x = confirm("WARNING: Once data is deleted it cannot be recovered. Do you wish to continue?");
     if (x)
          {return true;}
     else
          {return false;}
}
function openWinAcc(pid){
var qrystring
qrystring = "http://208.179.4.226/detail_acc.asp?pid="+pid //To be replace by real iv_ManageDomainName in production
child=open(qrystring,"childAcc","scrollbars,width=600,height=428");
}
function checkString(str,valid){
   if (!str) return false;
   // helper function, returns false if any character in string argument is not found in valid argument
   var check = str.split('');
   for(var i = 0; i < check.length; i++) {
      if(valid.indexOf(check[i]) == -1) return false;
   }
   return true;
}
function checknotrequire(str,valid){  
   // helper function, returns false if any character in string argument is not found in valid argument
   var check = str.split('');
   for(var i = 0; i < check.length; i++) {
      if(valid.indexOf(check[i]) == -1) return false;
   }
   return true;
}
function validate(which) {  
  for (i=0;i<which.length;i++) {
    var tempobj=which.elements[i];
     var prefix = tempobj.name.substring(0,3);
     var fieldname = tempobj.name.substring(3,60).toUpperCase();
     
     // Check for Prefix "str"
    if (prefix=="str") {
      if (tempobj.value==""){
        alert(fieldname+" is required!");
        tempobj.focus();
        return false;          
      }
     }
     if (tempobj.name =="strSummary" || tempobj.name=="snrFullStory"){
          if (tempobj.value.length > 7000) {
                alert(fieldname+" is limited to 7000 characters including spaces, please shorten your text.");
               tempobj.focus();
        return false;          
           }
     }
     // Check for Prefix "prt"
    if (prefix=="prt") {
      if (!checkString(tempobj.value," abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_()[]\/:&")){ // also test for space
        alert(fieldname+" is invalid. Please check your entry!");
        tempobj.focus();
        return false;          
      }
     }
     // Check for Prefix "pnr"
    if (prefix=="pnr") {
      if (!checknotrequire(tempobj.value," abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_()[]\/:&")){ // also test for space
        alert(fieldname+" is invalid. Please check your entry!");
        tempobj.focus();
        return false;          
      }
     }
     // Check for Prefix "chr"
    if (prefix=="chr") {
      if (!checkString(tempobj.value," abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'")) { // also test for space
        alert(fieldname+" is invalid. Please check your entry!")
        tempobj.focus();
        return false;
      }
     }
     // Check for Prefix "dnr"
    if (prefix=="dnr") {
      if (!checknotrequire(tempobj.value,"0123456789.") || tempobj.value < 0) { // also test for space
        alert(fieldname+" is invalid. Only numbers are allowed and minimum weight is 1")
        tempobj.focus();
        return false;
      }
     }
     
     // Check for Prefix "int"
    if (prefix=="int") {
      if (!checknotrequire(tempobj.value,"0123456789")) { // also test for space
        alert(fieldname+" is invalid. Only numbers are allowed!")
        tempobj.focus();
        return false;
      }
     }
     // Check for Prefix "dec"
    if (prefix=="dec") {
      if (!checkString(tempobj.value,"0123456789.")) { // also test for space
        alert(fieldname+" is invalid. Only integers and decimals are allowed!")
        tempobj.focus();
        return false;
      }
     }
           
  } // end for loop
return true;
}
// This script is intended for use with a minimum of Netscape 4 or IE 4.
          if(document.layers) {var ns4 = true;}
          if(document.all) {var ie4 = true;}
          function showObject(obj) {
               if (ns4) {obj.visibility = "show";}
               else if (ie4) {     obj.visibility = "visible";}
               }
          function hideObject(obj) {
               if (ns4) {obj.visibility = "hide";}
               if (ie4) {obj.visibility = "hidden";}
               }
// -->
</SCRIPT>
<script>
function checkDate(theField){
  dMsg.innerHTML = fDesc;
  fVal = theField.value;
  if(fVal==""){
    return false;
  }
  dPart = (fVal+" ").split(" ")[0].split("/");
  tPart = (fVal+" ").split(" ")[1].split(":");
  mPart = (fVal+" ").split(" ");
  if(!dPart[1] || dPart[1]=="") dPart[1] = 1;
  if(mPart[1] && mPart[1]>"" && dPart[2].length<4){
    dMsg.innerHTML = "<font color=red>Enter Year with four digits.</font><br>"+fDesc;
    return false;
  }
  if(!dPart[2] || dPart[2].length < 4) dPart[2] = 2000;
  if(!tPart[0] || tPart[0]=="") tPart[0] = 0;
  if(!tPart[1] || tPart[1]=="") tPart[1] = 0;
  if(mPart[2] && mPart[2]>"" && tPart[1].length<2){
    dMsg.innerHTML = "<font color=red>Enter Minutes with two digits.</font><br>"+fDesc;
    return false;
  }
  if(!mPart[2] || mPart[2]=="") mPart[2] = "AM";
  if(!mPart[2].match(/^[ap]m?$/i)){
    dMsg.innerHTML = "<font color=red>Use only AM or PM as time suffix.</font><br>"+fDesc;
    return false;
  }
  iDate = new Date(dPart[2], dPart[0]-1, dPart[1]);
  if(dPart[2]!=iDate.getFullYear()||dPart[1]!=iDate.getDate()||dPart[0]!=iDate.getMonth()+1){
    dMsg.innerHTML = "<font color=red>Invalid Date.</font><br>"+fDesc;
    return false;
  }
  hh = tPart[0]*1;
  mm = tPart[1]*1;
  ss = tPart[2]*1;
  if(hh<0 || hh>12 || mm<0 || mm>59 || ss<0 || ss>59){
    dMsg.innerHTML = "<font color=red>Invalid Time."+hh+":"+mm+":"+ss+"</font><br>"+fDesc;
    return false;
  }
  return (fVal.match(/^\d{1,2}\/\d{1,2}\/\d{4} \d{1,2}\:\d{1,2}\:\d{1,2} [ap]m$/i)!=null);
}
var fDesc = "MM/DD/YYYY HH:MM AM|PM";
var dMsg;
function init2(){
  dMsg = document.getElementById('msg');
  dMsg.innerHTML = fDesc;
  document.frmdetail.datAirDateTime.focus()
}
</script>
</HEAD>
<BODY onLoad="init();init2();" background="Images_System/bg_wlines.gif" bgColor=white leftMargin="0" rightMargin="0" topMargin="0" marginheight="0" marginwidth="0">
<DIV ID="splashScreen" STYLE="position:absolute;z-index:5;top:30%;left:35%;"></DIV>
<TABLE border="0" cellPadding="0" cellSpacing="0" width="100%">
                  <TR>
                   
                    <!--Left TD-->
                   
<TD><img src="Images_System/de_clear.gif" height="1"  width="6"><TD>    
<TD vAlign=top align="center">          
     
     <!--Logo Section-->  
    <TABLE border="0" cellPadding="0" cellSpacing="0">
            <TR>
                <TD valign="top">    
               <img src="Images_System/de_clear.gif" height="3" width="1"><br>
               <img src="../Images_System/lo.emanager.jpg" alt="" width="180" height="135" border="0">
               </TD>              
          </TR>
          <tr><TD><img src="Images_System/de_clear.gif" height="13" width="1"><TD></tr>    
     </TABLE>
     <!--/Logo Section-->
     
     <TABLE border="0" cellPadding="0" cellSpacing="0" width="100%">
          <tr bgcolor="#ABD8FF"><td colspan="5"></td></tr>
            <TR>
               <td bgcolor="#ABD8FF"><img src="Images_System/de_clear.gif" height="1" width="1"></td>
                <TD  align="center" width="50%"><a href="support.asp?k=a" class="TitleS">Admin</a></TD>
               <td bgcolor="#ABD8FF"><img src="Images_System/de_clear.gif" height="1" width="1"></td>            
               <TD bgcolor="#f6f6f6" align="center" width="50%"><a href="support.asp?k=b" class="TitleS">Business</a></TD>  
               <td bgcolor="#ABD8FF"><img src="Images_System/de_clear.gif" height="1" width="1"></td>            
          </TR>
          <tr bgcolor="#ABD8FF"><td colspan="5"></td></tr>
          <tr><TD colspan="5"><img src="Images_System/de_clear.gif" height="13" width="1"><TD></tr>    
     </TABLE>
     
     <!--Left Menu-->
    <TABLE border="0" cellPadding="0" cellSpacing="0">
        <TR>
            <TD>    
               
     <!--Site Tools-->          
     
     <!--/Site Tools-->
     
     <!--Business Tools-->
     
     
               <!--Order Manager-->
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                    
                <TR>
                         <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                       <TD width="100%"><A class="NavLeft" href="adm_orders.asp?k=bom">&nbsp;&nbsp;Order Manager</A></TD>                                        
                    </TR>                    
               </TABLE>              
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180">              
                   
                    <tr>
                         <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                         <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                    </tr>
               </TABLE>
               <!--/Order Manager-->
                   
               <!--Inventory Manager-->          
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                    
                <TR>
                         <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                       <TD width="100%"><A class="NavLeft" href="adm_catmgr.asp?k=bim&v=5">&nbsp;&nbsp;Inventory Manager</A></TD>                                        
                    </TR>                    
               </TABLE>              
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180">                    
                   
                   
                    <tr>
                         <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                         <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                    </tr>
               </TABLE>
               <!--/Inventory Manager-->
               
               <!--Article Manager-->    
               
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                    
                <TR>
                         <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                       <TD width="100%"><A class="NavLeft" href="adm_article.asp?k=bam">&nbsp;&nbsp;Article Manager</A></TD>                                        
                    </TR>                    
               </TABLE>              
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180">                    
                   
                    <tr>
                         <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                         <td height="6" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                    </tr>          
                         <tr><td align="right"></td><td bgcolor="#f5f5f5">&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<A class="small" href="adm_article_catmgr.asp?k=bam">Categories Tree</A></tr>                    
                         <tr><td align="right"><strong>&#187;</strong></td><td bgcolor="#f5f5f5">&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<A class="small" href="adm_article.asp?k=bam">Add New Articles</A></tr>    
                         <tr><td align="right"></td><td bgcolor="#f5f5f5">&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;<A class="small" href="adm_article_edit.asp?k=bam">Edit Articles</A></tr>    
                         <tr><td align="right"></td><td bgcolor="#f5f5f5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-<A class="small" href="adm_article_feature.asp?k=bam">Cover Feature</A></tr>          
                         <tr><td align="right"></td><td bgcolor="#f5f5f5">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-<A class="small" href="adm_article_feature.asp?k=bam&rt=n">Category Features</A></tr>    
     
                   
                   
                    <tr>
                         <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                         <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                    </tr>
               </TABLE>
               
               <!--/Article Manager-->
               
               <!--Promotion Manager-->
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                    
                <TR>
                         <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                       <TD width="100%"><A class="NavLeft" href="adm_promomgr.asp?k=bpm">&nbsp;&nbsp;Promotion Manager</A></TD>                                        
                    </TR>                    
               </TABLE>              
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180">                    
                   
                    <tr>
                         <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                         <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                    </tr>
               </TABLE>
               <!--/Promotion Manager-->
               
               <!--User Manager-->
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                    
                <TR>
                         <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                       <TD width="100%"><A class="NavLeft" href="adm_usrmgr.asp?k=bum">&nbsp;&nbsp;User Manager</A></TD>                                        
                    </TR>                    
               </TABLE>
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180">                    
                   
                    <tr>
                         <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                         <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                    </tr>
               </TABLE>
               <!--User Manager-->
     
               <!--Campaign Manager-->
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                    
                <TR>
                         <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                       <TD width="100%"><A class="NavLeft" href="#">&nbsp;&nbsp;Campaign Manager</A></TD>                                        
                    </TR>                    
               </TABLE>
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180">    
                   
                   
                   
                    <tr>
                         <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                         <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                    </tr>
                   
               </TABLE>
               
               <!--/Campaign Manager-->
               
               <!--Reporting Manager-->
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180" class="NavLeft">                    
                <TR>
                         <TD><IMG src="Images_System/de_2arrowr.gif" width="28" border="0" height="19"></A></TD>
                       <TD width="100%"><A class="NavLeft" href="http://www.vabc.com/reports_stats/index.html">&nbsp;&nbsp;Reporting Manager</A></TD>                                        
                    </TR>                    
               </TABLE>
               <TABLE border="0" cellpadding="0" cellspacing="0" width="180">          
               
                         
                   
                    <tr>
                         <td><img src="Images_System/de_clear.gif" width="28" height="1" border="0"></td>
                         <td height="7" bgcolor="#f5f5f5" width="100%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                    </tr>
               </TABLE>
               <!--/Reporting Manager-->
                   
     <!--/Business Tools-->
               
     <!--/Left Menu-->                        
         
                             
               </TD>
          </TR>          
     </TABLE>
</TD>
                    <!--/Left TD-->
                   
                    <!--Middel TD-->
                  <TD align=left valign=top width=100%>
                         
                         <!--Top Menu-->
                     
<TABLE border="0" cellPadding="0" cellSpacing="0" height="18" width="100%">
   <TR>
             <!--doted line-->
          <TD><img src="Images_System/de_clear.gif" height="1"  width="8"><TD>
             <TD height="38" valign="top" width="1" background="Images_System/de_vdotlow.gif"><img src="Images_System/de_dotlow.gif" height="18" width="1"><br><img src="Images_System/de_dotbase.gif" height="18" width="1"><TD>
         <TD><img src="Images_System/de_clear.gif" height="1"  width="15"><TD>
          <!--/doted line-->
         
          <TD align="left" valign="top" width="100%">                              
                  <TABLE  bgColor="#000000" border="0" cellpadding="0" cellspacing="0" height="18" width="100%">
                    <TR>
                         <td>
                              <TABLE  border="0" cellpadding="0" cellspacing="0" height="18">
                                   <tr>
                                      <TD align=middle width="70" bgcolor="#cc0000"><A class="TitleSL" href="default.asp">Home</A></TD>    
                                        <TD>&nbsp;&nbsp;&nbsp;&nbsp;<A class="TitleSL" href="support.asp?k=b">eManager Home</A></TD>                                      
                                   </tr>
                              </table>
                         </td>
                         <td class="TitleSL" nowrap align="right">VABC.COM <strong>&#187;</strong> Binh Le  | <A class="TitleSL" href="logout.asp?k=bam&v=5">Logout</A>&nbsp;&nbsp;</td>
                    </TR>                                            
               </TABLE>    
               
               <TABLE border="0" cellpadding="0" cellspacing="0" width="100%" height="28">
               <tr>
                    <td class="DomainHead" valign="bottom" height="28" style="color:#999999">Welcome</td>                    
                    <td valign="bottom" style="margin-bottom:0px;padding-bottom:0px;line-height:100%;" align="right">
                         <A href="adm_publish_exe.asp" style="color:#CC0000; font-weight:bold; text-decoration: underline;">» PUBLISH</A>&nbsp;&nbsp;<a href="/adm_article.asp?k=bam&v=5&iv_nsid=1" class="TitleS" style="color:#CC0000">News</a>&nbsp;|&nbsp;<a href="/adm_article.asp?k=bam&v=5&iv_nsid=2" class="TitleS" >Store</a>&nbsp;
                    </td>
                    <td class="DomainHead" valign="bottom" height="28" align="right"></td>
               </tr>    
               <tr bgcolor="#cccccc"><TD colspan="3"><img src="Images_System/de_clear.gif" height="1"  width="15"><TD></tr>
               </table>                    
          </TD>
     </TR>                              
</TABLE>


                         <!--/Top Menu-->
                         
                      <TABLE border="0" cellPadding="0" cellSpacing="0" width="100%">
                              <!--doted line-->
                                   <TD><img src="Images_System/de_clear.gif" height="1"  width="8"><TD>                        
                                   <TD background="Images_System/de_vdotlow.gif"><IMG src="Images_System/de_clear.gif" height="1"  width="1" border="0"></TD>
                                   <TD><IMG src="Images_System/de_clear.gif" height="1"  width="15" border="0"></TD>
                                   <!--/doted line-->
                                   
                                   <!--Left Mid TD-->
                               <TD valign="top" width="100%">
                                   <TABLE border="0" cellpadding="0" cellSpacing="0" width="100%">
                                        <tr><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="10" border="0"></td><tr>
                                       
                                        <tr>
                                             <td><img src="Images_System/de_clear.gif" width="10" height="10" border="0"></td>
                                             <td width="50%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                                             <td><img src="Images_System/de_clear.gif" width="10" height="10" border="0"></td>
                                             <td width="50%"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                                             <td><img src="Images_System/de_clear.gif" width="10" height="10" border="0"></td>
                                        <tr>
                                        <!--************* Template Top Ends **************-->
                                       
                                        <tr>    
                                        <td>&nbsp;</td>                                        
                                        <!--Product Listing-->
                                        <td valign="top">                                        
                                             <table border="0" cellpadding="0" cellspacing="0" width="100%">    
                                             <tr><td bgcolor="#cccccc" colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>
                                             <Form name="frmlist" action="adm_article.asp?k=bam&v=5&cp=1" method="post">    
                                             <tr>
                                                  <td colspan="3">
                                                       <table border="0" cellpadding="0" cellspacing="0" width="100%">    
                                                       <tr>
                                                            <td colspan="2"><input type="button" value="Check All" class="ButtonR" onclick="checkall();"><input type="button" value="Uncheck All" class="ButtonR" onclick="clearall();"></td>
                                                            <td align="right"><input type="submit" name="al" value="Delete" class="ButtonR"  onclick="return confirmDelete();"><input type="submit" name="al" value="Activate" class="ButtonR"></td>
                                                       </tr>    
                                                       </table>
                                                  </td>
                                             </tr>
                                             <tr><td  bgcolor="#cccccc" colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>
                                             <tr>
                                                  <td bgcolor="#cccccc"><img src="Images_System/de_clear.gif" width="1" height="452" border="0"></td>
                                                  <Td valign="top" width="100%">                                            
                                                       <table border="0" cellpadding="0" cellspacing="0" width="100%">    
                                                                                                                                                               
                                                                                               
                                                            <tr><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="5" border="0"></td><tr>                                        
                                                                                                         
                                                            <tr valign="bottom" bgcolor="#0A50A1">
                                                                 <td class="TitleL">&nbsp;</td>
                                                                 <td class="TitleL">ArticleID&nbsp;&nbsp;</td>
                                                                 <td class="TitleL">Headline</td>          
                                                                 <td class="TitleL">&nbsp;</td>          
                                                                 <td class="TitleL">&nbsp;</td>                                        
                                                            </tr>    
                                                            <tr bgcolor="#000000"><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>    
                                                            <tr><td colspan="5" height="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>    
                                                            <tr>
                                                                 <td class="small" nowrap>&nbsp;Sort By:&nbsp;</td>
                                                                 <td class="TitleL" colspan="3">
                                                                 <select name="sb" class="frmText">
                                                                      <option value="Stock" >ArchiveID#</option>
                                                                      <option value="Brand" >Subscription</option>
                                                                 </select>
                                                                 <select name="so" class="frmText">
                                                                      <option value="ASC" >A-Z</option>
                                                                      <option value="DESC" >Z-A</option>
                                                                 </select>
                                                                 <input type="image" name="a" src="Images_System/btn_go.gif" alt="" width="32" height="25" border="0" align="absmiddle">
                                                                 </td>                                                                                              
                                                            </tr>    
                                                            <tr><td colspan="5" height="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>    
                                                            <tr bgcolor="#cccccc"><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>    
                                                           
                                                            <!--Paging -->
                                                                     
                                                            <tr><td colspan="5" height="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>    
                                                            <tr>                                                                
                                                                 <td colspan="2" valign="middle" class="small">&nbsp;Page 1/1&nbsp;-&nbsp;1&nbsp;</td>                        
                                                                 <td colspan="2" valign="middle" align="right">
                                                                      <table cellpadding="0" cellspacing="0" border="0" width="200">                                        
                                                                           <tr><td colspan="3" height="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>    
                                                                           <tr>
                                                                                <td colspan="3" align="center">
                                                                                     <table cellspacing="0" cellpadding="0" border="0" width="100%">
                                                                                     <tr>
                                                                                         
                                                                                          <td align="center"><img src="Images_System/ico_previousset_off.gif" width="28" height="17" border="0"></td>
                                                                                         
                                                                                          <td align="center"><img src="Images_System/ico_previouspage_off.gif" width="28" height="17" border="0" hspace="3"></td>
                                                                                         
                                                                                                    <td width="10%" align="center" valign="middle" class='PagingNavTxtOnSelected'><a href='adm_article.asp?cp=1&pid=82595&k=bam&v=5&sb=&so=' class='PagingNavTxtOn'>1</a></td>                                                            
                                                                                         
                                                                                                    <td width="10%" align="center" valign="middle" >2</td>                                                            
                                                                                         
                                                                                                    <td width="10%" align="center" valign="middle" >3</td>                                                            
                                                                                         
                                                                                                    <td width="10%" align="center" valign="middle" >4</td>                                                            
                                                                                         
                                                                                                    <td width="10%" align="center" valign="middle" >5</td>                                                            
                                                                                         
                                                                                          <td align="center"><img src="Images_System/ico_nextpage_off.gif" width="28" height="17" border="0" hspace="3"></td>
                                                                                         
                                                                                          <td align="center"><img src="Images_System/ico_nextset_off.gif" width="28" height="17" border="0"></td>
                                                                                                                                                                     
                                                                                     </tr>
                                                                                </table>                                                                
                                                                                </td>                                                            
                                                                           </tr>                                                  
                                                                      </table>
                                                                 </td>
                                                            </tr>
                                                            <tr><td colspan="5" height="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>    
                                                            <tr bgcolor="#cccccc"><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>    
                                                           
                                                            <!--/Paging-->
                                                                                               
                                                            <tr><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>                                                                                                        
                                                           
                                                           
                                                            <tr><td colspan="5" height="25" class="TitleS" style="color:#cc0000; padding-left: 3 px; padding-right: 3 px">Remember to activate the below newly added articles.</td></tr>
                                                                 
                                                                      <tr bgcolor="#e6e6e6">
                                                                           <td><input type="checkbox" name="prodid" value="82595" class="frmText"></td>
                                                                           <td nowrap><a href="adm_article.asp?k=bam&v=5&pid=82595&cp=1&sb=&so=" style="font-size:10px;" class="regular">1009</a><img src="Images_System/de_clear.gif" alt="" width="5" height="1" border="0"></td>
                                                                           <td nowrap>Headline</td>
                                                                           <td><a href="adm_article.asp?k=bam&v=5&pid=82595&mpid=82595&cp=1&sb=&so=" class="TitleS"><img src="Images_System/ico_sub.gif" alt="" width="26" height="16" border="0"></a></td>
                                                                           <td nowrap><a href="#" onclick="openWinAcc(82595)"><img src="Images_System/ico_preview.gif.gif" alt="" width="16" height="15" border="0"></a></td>
                                                                      </tr>    
                                                                                                   
                                                            <tr><td height="18" colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>                                                                                              
                                                       </table>
                                                  </TD>
                                                  <td bgcolor="#cccccc"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                                             </tr>
                                             <tr><td bgcolor="#cccccc" colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>
                                             <tr>
                                                  <td colspan="3">
                                                       <table border="0" cellpadding="0" cellspacing="0" width="100%">    
                                                       <tr>
                                                            <td colspan="2"><input type="button" value="Check All" class="ButtonR" onclick="checkall();"><input type="button" value="Uncheck All" class="ButtonR" onclick="clearall();"></td>
                                                            <td align="right"><input type="submit" name="al" value="Delete" class="ButtonR"  onclick="return confirmDelete();"><input type="submit" name="al" value="Activate" class="ButtonR"></td>
                                                       </tr>    
                                                       </table>
                                                  </td>
                                             </tr>
                                             <tr><td bgcolor="#cccccc" colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>
                                             </form>
                                             </table>                                        
                                        </td>
                                        <!--/Product Listing-->          
                                       
                                        <!--Product Details-->          
                                        <td>&nbsp;</td>
                                        <td valign="top">
                                        <table bgcolor="#e6e6e6" border="0" cellpadding="0" cellspacing="0">                                        
                                        <Form name="frmdetail" action="adm_article.asp?k=bam&v=5&pid=82595&cp=1&sb=&so=&mpid=0" method="post" onSubmit="return (validate(this) && checkDate(this.datAirDateTime))">    
                                        <tr bgcolor="#cccccc"><td colspan="5"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>          
                                        <tr bgcolor="#FFFFFF">
                                             <td bgcolor="#cccccc" rowspan="36"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                                             <td colspan="2"><input type="button" name="ad" onclick="resetfrmdetail();" value="Clear All" class="ButtonR"></td>
                                             <td align="right"><input type="submit" name="ad" value="Update" class="ButtonR">&nbsp;&nbsp;<input type="submit" name="ad" value="Add" class="ButtonR"></td>
                                             <td bgcolor="#cccccc" rowspan="36"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td>
                                        </tr>          
                                        <tr bgcolor="#cccccc"><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>          
                                                                     
                                        <tr bgcolor="#FFFFFF"><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="4" border="0"></td><tr>    
                                                                           
                                        <tr valign="bottom" bgcolor="#333333"><td class="TitleL" colspan="3">&nbsp;Edit Article "1009"</td></tr>
                                       
                                        <tr><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="5" border="0"></td><tr>    
                                        <tr >
                                             <td style="color: #000000" class="TitleS" colspan="2">&nbsp;ArchiveID:</td>
                                             <td><input maxlength="50" type="text" name="strArchiveID" value="1009" class="frmText" style="width:175;">&nbsp;</td>
                                        </tr>              
                                        <tr >
                                             <td style="color: #000000" class="TitleS" colspan="2" valign="top">&nbsp;Air Date Time:</td>
                                             <td>
                                                  <input maxlength="50" type="text" name="datAirDateTime" value="12/23/2003 1:23:00 AM" class="frmText" style="width:175;" onKeyUp="checkDate(this)">
                                                  <div id="msg" style="font-size:7pt;"></div></td>
                                        </tr>                                  
                                        <tr>
                                             <td colspan="2" class="TitleS" style="color: #000000;">&nbsp;Language:</td>
                                             <td style="padding-top:5px;">
                                             <select name="Language" class="frmText" style="width:175;">
                                                  <option value="1" SELECTED>English</option>    
                                                  <option value="2" >Vietnamese</option>    
                                             </select>                                            
                                             </td>
                                        </tr>
                                        <tr >
                                             <td colspan="2">&nbsp;Lang2 AID:</td>
                                             <td>
                                                  <input maxlength="20" type="text" name="Custom1" value="" class="frmText" style="width:175;">
                                                  (ArchiveID)
                                             </td>
                                        </tr>                              
                                        <tr >
                                             <td class="TitleS">&nbsp;<a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000">L1 Main Cat</a></td>
                                             <td><a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000"><img src="Images_System/ico_edit.gif" alt="" width="12" height="12" vspace="2" border="0" align="middle"></a></td>
                                             <td>
                                             <select name="cat" id="cat" class="frmText" style="width:175;" onChange="listsubcat.populate();listsubcat2.populate();">
                                                 
                                                                 <option value="868" SELECTED>Community Health</option>
                                                 
                                                                 <option value="1041" >Econony Exchange</option>
                                                 
                                                                 <option value="863" >Education</option>
                                                 
                                                                 <option value="858" >Entertainment</option>
                                                 
                                                                 <option value="856" >US</option>
                                                 
                                                                 <option value="1075" >Vietnamese Community</option>
                                                 
                                                                 <option value="854" >Weather</option>
                                                 
                                                                 <option value="891" >World</option>
                                                                                                             
                                             </select>
                                             </td>
                                        </tr>
                                        <tr>
                                             <td class="TitleS">&nbsp;<a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000">L2 Sub Cat</a></td>
                                             <td><a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000"><img src="Images_System/ico_edit.gif" alt="" width="12" height="12" vspace="2" border="0" align="middle"></a></td>
                                             <td>
                                             
                                             <select name="subcat" id="subcat" class="frmText" style="width:175;" onChange="listsubcat2.populate();">                                                                
                                                 
                                                  <SCRIPT LANGUAGE="JavaScript">listsubcat.printOptions()</SCRIPT>    
                                                                                                   
                                             </select>                                                                                
                                             </td>
                                        </tr>
                                        <tr>
                                             <td class="TitleS">&nbsp;<a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000">L3 Sub Cat</a></td>
                                             <td><a href="adm_catmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000"><img src="Images_System/ico_edit.gif" alt="" width="12" height="12" vspace="2" border="0" align="middle"></a></td>
                                             <td>
                                             <select name="subcat2" id="subcat2" class="frmText" style="width:175;">          
                                                                                                         
                                                  <SCRIPT LANGUAGE="JavaScript">listsubcat2.printOptions()</SCRIPT>    
                                                                                                                   
                                             </select>                                                                                
                                             </td>
                                        </tr>
                                        <tr>
                                             <td class="TitleS">&nbsp;<a href="adm_mfgmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000">Subsription</a></td>
                                             <td><img src="Images_System/de_clear.gif" alt="" width="12" height="12" vspace="2" border="0" align="middle"></td>
                                             <td>
                                             <select name="MfgID" id="MfgID" class="frmText" style="width:175;" onChange="listbrandname.populate();">
                                                 
                                                                 <option value="2946" SELECTED>Premium</option>
                                                 
                                                                 <option value="2945" >Standard</option>
                                                                                                         
                                             </select>
                                             </td>
                                        </tr>
                                                                               
                                          <tr >
                                             <td class="TitleS">&nbsp;<a href="adm_mfgmgr.asp?k=bam&v=5" class="TitleS" style="color: #000000">Subscr.Level</a>&nbsp;</td>
                                             <td><img src="Images_System/de_clear.gif" alt="" width="12" height="12" vspace="2" border="0" align="middle"></td>
                                             <td>
                                             <select name="brandname" id="brandname" class="frmText" style="width:175;">          
                                                                                           
                                                       <SCRIPT LANGUAGE="JavaScript">listbrandname.printOptions()</SCRIPT>    
                                                       
                                             </select>                    
                                             </td>
                                        </tr>
                                        <tr><td><img src="Images_System/de_clear.gif" alt="" width="1" height="16" border="0"></td></tr>
                                        <tr >
                                             <td class="TitleS" style="color: #000000" colspan="2">&nbsp;Headline:</td>
                                             <td><input maxlength="200" type="text" name="strHeadline" value="Headline" class="frmText" style="width:350;"></td>
                                        </tr>
                                        <tr >
                                             <td class="TitleS" style="color: #000000" colspan="2">&nbsp;By Author:</td>
                                             <td><input maxlength="50" type="text" name="strAuthor" value="Athor" class="frmText" style="width:350;"></td>
                                        </tr>                                            
                                        <tr >
                                             <td valign="top" class="TitleS" style="color: #000000" colspan="2">&nbsp;Summary:<br><em style="color:#000000;font-size:10;font-weight : normal;line-height:120%;">
                                             &nbsp;&nbsp;&nbsp;&nbsp;7000 chars<br>
                                             &nbsp;&nbsp;&nbsp;&nbsp;maximum<br>
                                             &nbsp;&nbsp;&nbsp;&nbsp;including<br>
                                             &nbsp;&nbsp;&nbsp;&nbsp;spaces</em></td>
                                             <td>
                                             <textarea cols="20" rows="8" name="strSummary" class="frmText" style="width:350;">summary</textarea>
                                             </td>
                                        </tr>
                                        <tr>
                                             <td valign="top" style="color: #000000" colspan="2">&nbsp;Full Story:<br><em style="color:#000000;font-size:10;font-weight : normal;line-height:120%;">
                                             &nbsp;&nbsp;&nbsp;&nbsp;7000 chars<br>
                                             &nbsp;&nbsp;&nbsp;&nbsp;maximum<br>
                                             &nbsp;&nbsp;&nbsp;&nbsp;including<br>
                                             &nbsp;&nbsp;&nbsp;&nbsp;spaces</em></td>
                                             <td>
                                             <textarea cols="20" rows="24" name="snrFullStory" class="frmText" style="width:350;">Full story</textarea>
                                             </td>
                                        </tr>
                                        <tr >
                                             <td colspan="2">&nbsp;Img Sub-Title:</td>
                                             <td><input maxlength="200" type="text" name="Sizes" value="" class="frmText" style="width:350;"></td>
                                        </tr>    
                                        <tr >
                                             <td colspan="2" valign="top">&nbsp;Video &nbsp;Description:</td>
                                             <td>
                                             <textarea cols="20" rows="7" name="Custom4" class="frmText" style="width:350;"></textarea>
                                             </td>
                                        </tr>
                                        <tr >
                                             <td colspan="2">&nbsp;Video Time:</td>
                                             <td>
                                                  <input maxlength="200" type="text" name="Custom2" value="" class="frmText" style="width:175;">
                                                  (i.e. 00:15:20)
                                             </td>
                                        </tr>                                        
                                        <tr >
                                             <td colspan="2">&nbsp;Places:</td>
                                             <td><input maxlength="200" type="text" name="Colors" value="" class="frmText" style="width:350;"></td>
                                        </tr>
                                        <tr >
                                             <td colspan="2">&nbsp;Personality:</td>
                                             <td><input maxlength="200" type="text" name="Custom3" value="" class="frmText" style="width:350;"></td>
                                        </tr>                    
                                       
                                        <tr><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="5" border="0"></td><tr>          
                                        <tr><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="5" border="0"></td><tr>          
                                        <tr bgcolor="#cccccc"><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>    
                                        <tr bgcolor="#FFFFFF">    
                                             <td colspan="2"><input type="button" name="ad" onclick="resetfrmdetail();" value="Clear All" class="ButtonR"></td>
                                             <td align="right"><input type="submit" name="ad" value="Update" class="ButtonR">&nbsp;&nbsp;<input type="submit" name="ad" value="Add" class="ButtonR"></td>
                                        </tr>
                                        <tr bgcolor="#cccccc"><td colspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td><tr>          
                                       
                                        </table>
                                        </td>
                                        <td>&nbsp;</td>
                                        <!--/Product Details-->
                                        </tr>          
                                       
                                        <!--************* Template Bottom Starts**************-->          
                                                                                         
                                   </table>
                                   </td>  
                                   <!--/Right Mid TD-->              
                               </TR>                
                           </TABLE>
                 </TD>
                 <!--/Middel TD-->
               </TR>    
               <tr><td height="12" olspan="3"><img src="Images_System/de_clear.gif" width="1" height="1" border="0"></td></tr>              
               <!--doted line-->
               <tr bgcolor="#ABD8FF">
                    <td colspan="3" >&nbsp;</td>
                    <td><TABLE bgcolor="#ABD8FF" WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER="0" height="60">
<tr>
<!--doted line-->
<TD><img src="../Images_System/de_clear.gif" height="1"  width="8"><TD>
<TD height="38" valign="top" width="1" background="Images_System/de_vdotlow.gif"><img src="../Images_System/de_clear.gif" height="18" width="1"><TD>
<TD><img src="../Images_System/de_clear.gif" height="1"  width="5"><TD>
<!--/doted line-->

<td><a href="https://www.thawte.com/cgi/server/certdetails.exe?code=USMEGA50" target="new"><img src="../Images_System/ico_thawte.gif" alt="" width="47" height="30" border="0" hspace="10"></a></td>
<td width="100%" valign="middle">
     <table cellpadding="0" cellspacing="0" border="0">
          <TR>              
               <TD height="18" valign="top">
               <a href="doc.asp?d=privacypolicy" class="Small">Privacy Policy</a>&nbsp;|&nbsp;
               <a href="doc.asp?d=useragreement" class="Small">Terms of Use</a>
               </TD>
          </TR>
          <TR>              
               <TD height="18" valign="top" class="small">              
               ©2001-2003&nbsp;www.megaleap.com. All rights reserved.
               </TD>
          </TR>
     </table>
</td>
</tr>
</TABLE>
</td>
               </tr>    
               <!--/doted line-->              
          </TABLE>

</BODY>
</HTML>
 


Good luck,
NetGroove



0
 
Michel PlungjanIT ExpertCommented:
@Netgroove: ????
0
 
NetGrooveCommented:
It works for me. So I think it will work for Andre too.
0
 
Michel PlungjanIT ExpertCommented:
What was your post? What did you add?
0
 
NetGrooveCommented:
Why do you ask?

Ok, I added several things.
1.) I changed all occurance of this:
document.forms[0].datAirDateTime

To this:
document.frmdetail.datAirDateTime

2.) I changed this:
onSubmit="return validate(this);return checkDate(document.forms[0].datAirDateTime)">    

To this:
onSubmit="return (validate(this) && checkDate(this.datAirDateTime))">    

3.) I extended the checkDate() function for seconds check.

My intention was to change as little code as possible.



0
 
Michel PlungjanIT ExpertCommented:
And the only difference to mine was 3.
My intention was to fix the bug and I did.

Michel
0
 
NetGrooveCommented:
You mean you used the form name for field referencing and you used logical AND for return codes summarizing?
0
 
Michel PlungjanIT ExpertCommented:
No I integrated the checkDate in the validation script and kept the forms array access to change as little as possible and allow the form tag name to be removed in case andreni wanted to have a validated form tag. like this summation of my suggestions in this thread:

Change
  document.forms[0].datAirDateTime.focus()
to

  document.forms[1].datAirDateTime.focus()

in init2

Change the end of validate from

  } // end for loop
return true;
}

to

  } // end for loop
  return checkDate(which.datAirDateTime)
}


and change
onSubmit="return validate(this);return checkDate(document.forms[0].datAirDateTime)"
to
onSubmit="return validate(this)"

Michel
0
 
NetGrooveCommented:
So you still state my point 3 is the only difference?
0
 
Michel PlungjanIT ExpertCommented:
Yes -identically functionalitywise and your point 3 was not related to the bug.
0
 
NetGrooveCommented:
Sorry Andre,

I did not extend the fDesc to:
var fDesc = "MM/DD/YYYY HH:MM:SS AM|PM";

Are you still interested in reduction of upper function code?
Or is for you better not to change a running system?


0
 
andreni78Author Commented:
Thank you very much NetGroove and mplungjan.

NetGroove, wrote the CheckDate function and the related field. Michel wrote the rest of the code a year ago at Askme.com. It's good to see you again here Michel.

Both solved my problem and Thank NetGroove for an improved version. You both are my favorite Javascripts experts so I have to split points.

Do you know ASP ? (just 3.0 not .net)
If so next time I can post the actually source code not the executed code because I am having problem with a javascript page (form 2) that dynamically generate the Javascript code by ASP depend what was selected in the form 1.

Please let me know so I can post another one. All of my question have the maximum points (500).

QUESTION:
How to make someone a favorite experts in this site? by any mean? even just quick links..

Thanks,

Andre
0
 
NetGrooveCommented:
You make a favorite experts by posting feedbacks like the one above :-)
You can not force anybody to help you, but being kindly noticed like it your feedback above helps you to be attractive to helpers like Michel an me.

For your ASP question is my recommendation that you decide what is the bigger question part in your situation.
If it is more ASP and you like only experts from JavaScript to support you, then post your question in ASP area and make here a small reference question link to main ASP question.

And thank you for the points.
NetGroove

0
 
Michel PlungjanIT ExpertCommented:
Thanks from here too..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 12
  • 7
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now