Why is this posted in the Web Dev Software Section, under the UltraDev package?
Main Topics
Browse All TopicsHi All
I've created a webpage with DW MX 2004. Nothing handcoded just DW created code.
The link to the error is here: http://www.dragonswim.dk/j
The error code is:
Line 96
Char: 22
Error: 'Length' is null or not an object
Code: 0
URL: http://www.dragonswim.dk/j
The whole code is here:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="[connection string file here]" -->
<!--#include file="[another connection string file here]" -->
<%
' *** Edit Operations: declare variables
Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd
Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId
Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i
MM_editAction = CStr(Request.ServerVariabl
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.
End If
' boolean to abort record edit
MM_abortEdit = false
' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables
If (CStr(Request("MM_insert")
MM_editConnection = MM_Conn_STRING
MM_editTable = "profil"
MM_editRedirectUrl = "thankyou.asp"
MM_fieldsStr = "fornavn|value|mellemnavn|
MM_columnsStr = "fornavn|',none,''|mellemn
' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")
' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_field
Next
' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If
End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it
Dim MM_tableValues
Dim MM_dbValues
If (CStr(Request("MM_insert")
' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),"
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"
If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB
MM_editCmd.ActiveConnectio
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnectio
If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editR
End If
End If
End If
%>
<%
Dim RSTid
Dim RSTid_numRows
Set RSTid = Server.CreateObject("ADODB
RSTid.ActiveConnection = MM_ConnNews_STRING
RSTid.Source = "SELECT timestamp FROM tblMenu WHERE category = 'coach' ORDER BY ID desc"
RSTid.CursorType = 0
RSTid.CursorLocation = 2
RSTid.LockType = 1
RSTid.Open()
RSTid_numRows = 0
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>
<!--#include file="title.asp"-->
</title>
<link href="css/default7.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_pre
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&p
d=parent.frames[n.substrin
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;
for(i=0;!x&&d.layers&&i<d.
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arg
if ((x=MM_findObj(a[i]))!=nul
}
/* BEGIN Advanced HTML Editor */
var BaseURL = "../../Dragonswimdk/www/";
/* END Advanced HTML Editor */
//-->
</script>
<SCRIPT TYPE="text/javascript">
<!--
var submitRolls = new Object();
function submitroll(src, oversrc, name)
{
this.src=src;
this.oversrc=oversrc;
this.name=name;
this.alt="Submit Query";
this.write=submitroll_writ
}
function submitroll_write()
{
var thisform = 'document.forms[' + (document.forms.length - 1) + ']';
submitRolls[this.name] = new Object();
submitRolls[this.name].ove
submitRolls[this.name].ove
submitRolls[this.name].out
submitRolls[this.name].out
document.write
(
'<A onMouseOver="if (document.images)document.
' onMouseOut="if (document.images)document.
' HREF="javascript:'
);
if (this.sendfield)
{
if (! this.sendvalue)
this.sendvalue = 1;
document.write(thisform, ".elements['", this.sendfield, "'].value='", this.sendvalue, "';");
}
document.write(thisform + '.submit();void(0);"');
if (this.msg)document.write('
document.write('>');
document.write('<IMG SRC="' + this.src + '" ALT="' + this.alt + '" BORDER=0 NAME="' + this.name + '"');
if (this.height)document.writ
if (this.width)document.write
if (this.otheratts)document.w
document.write('></A>');
if (this.sendfield)
{
document.write('<INPUT TYPE=HIDDEN NAME="' + this.sendfield + '">');
document.forms[document.fo
}
}
function altRowColors(){ //v2.0
var args = arguments, obj, color0, color1, rowList;
for(var a = 0; a < args.length; a+=3){
obj = args[a+0]; color0 = args[a+1]; color1 = args[a+2];
obj = (isNaN(obj)) ? document.getElementById(ob
if(obj) rowList = obj.getElementsByTagName("
for(var i = 0; i < rowList.length; i++) rowList[i].style.backgroun
}
}
function YY_checkform() { //v4.71
//copyright (c)1998,2002 Yaromat.com
var a=YY_checkform.arguments,o
for (i=1; i<a.length;i=i+4){
if (a[i+1].charAt(0)=='#'){r=
o=MM_findObj(a[i].replace(
o1=MM_findObj(a[i+1].repla
v=o.value;t=a[i+2];
if (o.type=='text'||o.type=='
if (r&&v.length==0){err=true}
if (v.length>0)
if (t==1){ //fromto
ma=a[i+1].split('_');if(is
} else if (t==2){
rx=new RegExp("^[\\w\.=-]+@[\\w\\
} else if (t==3){ // date
ma=a[i+1].split("#");at=v.
if(at){
cd=(at[ma[1]])?at[ma[1]]:1
dte=new Date(cy,cm,cd);
if(dte.getFullYear()!=cy||
}else{err=true}
} else if (t==4){ // time
ma=a[i+1].split("#");at=v.
} else if (t==5){ // check this 2
if(o1.length)o1=o1[a[i+1].
if(!o1.checked){err=true}
} else if (t==6){ // the same
if(v!=MM_findObj(a[i+1]).v
}
} else
if (!o.type&&o.length>0&&o[0]
at = a[i].match(/(.*)\[(\d+)\].
o2=(o.length>1)?o[at[2]]:o
if (t==1&&o2&&o2.checked&&o1&
if (t==2){
oo=false;
for(j=0;j<o.length;j++){oo
if(!oo){s+='* '+a[i+3]+'\n'}
}
} else if (o.type=='checkbox'){
if((t==1&&o.checked==false
} else if (o.type=='select-one'||o.t
if(t==1&&o.selectedIndex/1
}else if (o.type=='textarea'){
if(v.length<a[i+1]){err=tr
}
if (err){s+='* '+a[i+3]+'\n'; err=false}
}
if (s!=''){alert('FØLGENDE FELTER MANGLER AT BLIVE UDFYLDT:\t\t\t\t\t\n\n'+s)
document.MM_returnValue = (s=='');
}
//-->
</SCRIPT>
<style type="text/css">
<!--
/* BEGIN Advanced HTML Editor */
.dmx_btn { width: 22px; height: 22px; border: 1px solid #ECE9D8; margin: 0; padding: 0; background-color: #ECE9D8; }
.dmx_btnOver { width: 22px; height: 22px; border: 1px outset; margin: 0; padding: 0; background-color: #FCF9E8; }
.dmx_btnDown { width: 22px; height: 22px; border: 1px inset; margin: 0; padding: 0; background-color: #FCF9E8; }
.dmx_btnNA { width: 22px; height: 22px; border: 1px solid #ECE9D8; margin: 0; padding: 0; -moz-opacity:0.25; opacity:0.25; filter: alpha(opacity=25);}
.dmx_menuBar { background-color: #ECE9D8; }
.style1 {
color: #FF0000;
font-weight: bold;
font-size: 16px;
}
/* END Advanced HTML Editor */
-->
</style>
<script language="JavaScript" src="../../Dragonswimdk/ww
<script language="JavaScript" src="../../Dragonswimdk/ww
<body class="new_no_body_margin"
<div class="global">
<div class="global_main">
<div id="top"></div>
<div id="top_nav">
<form action="soegning.asp" name="Search" method="post">
<div class="search_field"><inpu
<div class="search_button">
<SCRIPT TYPE="text/javascript">
<!--
var sr = new submitroll("submit.out.jpg
sr.write();
//-->
</SCRIPT>
</div>
</form>
</div>
<div id="toc_top"></div>
<div id="toc_content">
<div class="toc_nav_top"><a href="default.asp" target="_self" onMouseOver="MM_swapImage(
<div class="toc_nav_top"><a href="news.asp" target="_self" onMouseOver="MM_swapImage(
<div class="toc_nav_top"><a href="calendar.asp" target="_self" onMouseOver="MM_swapImage(
<div class="toc_nav_top"><a href="facts.asp" target="_self" onMouseOver="MM_swapImage(
<div class="toc_nav_top"><a href="contact.asp" target="_self" onMouseOver="MM_swapImage(
</div>
<div id="toc_bottom"></div>
<div id="toc_below_bottom">
<!--#include file="subtoc.asp"-->
</div>
<!--#Her starter nyheden-->
<div class="newsitem">
<form name="form1" method="POST" action="<%=MM_editAction%>
<table width="510" border="0" cellpadding="0" cellspacing="0" class="news_content">
<tr>
<td><p class="search_header">Tilm
<p>BEMÆRK - der kan ikke foretages ændringer til tidligere afsendte tilmelding til venteliste - disse slettes automatisk hvis man alligevel tilmelder sit barn 2 gange.</p>
<p>Istedet skal man rette henvendelse til kontoret for at ændre i tilmeldingen - kontakt kontoret herfor</p>
<p>Felter markeret med <span class="style1">*</span> SKAL udfyldes. </p>
<p> </p></td>
</tr>
<tr>
<td><table width="510" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150">Fornavn <span class="style1">*</span> </td>
<td><span class="bggrey">
<input name="fornavn" type="text" id="fornavn" size="50">
</span></td>
</tr>
<tr>
<td width="150">Mellemnavn(e)<
<td><span class="bggrey">
<input name="mellemnavn" type="text" id="mellemnavn" size="50">
</span></td>
</tr>
<tr>
<td width="150">Efternavn <span class="style1">*</span></t
<td><span class="bggrey">
<input name="efternavn" type="text" id="efternavn" size="50">
</span></td>
</tr>
<tr>
<td width="150">Fødsels
<td><span class="bggrey">
<input name="birthdate" type="text" id="birthdate" size="16">
(SKAL være i dd-mm-ååå
</tr>
<tr>
<td width="150">Adresse <span class="style1">*</span></t
<td><span class="bggrey">
<input name="adresse" type="text" id="adresse" size="50">
</span></td>
</tr>
<tr>
<td width="150">Postnr. <span class="style1">*</span></t
<td><span class="bggrey">
<input name="postnummer" type="text" id="postnummer" size="10">
</span></td>
</tr>
<tr>
<td width="150">By <span class="style1">*</span></t
<td><span class="bggrey">
<input name="byen" type="text" id="byen" size="50">
</span></td>
</tr>
<tr>
<td width="150">Telefon (fastnet) <span class="style1">*</span></t
<td><span class="bggrey">
<input name="telefon" type="text" id="telefon" size="20">
<input name="public_phone" type="hidden" id="public_phone" value="1">
</span></td>
</tr>
<tr>
<td width="150">Mobiltelefon</
<td><span class="bggrey">
<input name="mobil" type="text" id="mobil" size="20">
<input name="public_mobile" type="hidden" id="public_mobile" value="1">
</span></td>
</tr>
<tr>
<td width="150">Mail</td>
<td><span class="bggrey">
<input name="mail" type="text" id="mail" size="50">
</span></td>
</tr>
<tr>
<td width="150">Evner/Bem&aeli
<td> </td>
</tr>
</table>
<textarea dmxedit="true" id="education" name="education" style="width:500px;height:
<input name="Submit" type="submit" onClick="YY_checkform('for
<input type="submit" name="Submit" value="Annullér al indtastning">
<span class="bggrey">
<input name="out" type="hidden" id="out" value="0">
<input name="coach" type="hidden" id="coach" value="0">
<input name="helpcoach" type="hidden" id="helpcoach" value="0">
<input name="activecoach" type="hidden" id="activecoach" value="0">
<input name="activehelpcoach" type="hidden" id="activehelpcoach" value="0">
<input name="swimmer" type="hidden" id="swimmer" value="1">
<input name="activeswimmer" type="hidden" id="activeswimmer" value="0">
<input name="hold" type="hidden" id="hold" value="0">
<input name="team_leader" type="hidden" id="team_leader" value="0">
<input name="official" type="hidden" id="official" value="0">
<input name="tidtager" type="hidden" id="tidtager" value="0">
<input name="bestyrelse" type="hidden" id="bestyrelse" value="0">
<input name="venteliste" type="hidden" id="venteliste" value="1">
<input name="public_mail" type="hidden" id="public_mail" value="1">
</span>
</td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
</div>
<!--#include file="sponsors.asp"-->
<div class="led">
<%if (RSTid.Fields.Item("timest
<object classid="clsid:D27CDB6E-AE
<param name="movie" value="flash/led.swf">
<param name="quality" value="high">
<embed src="flash/led.swf" quality="high" pluginspage="http://www.ma
<!--param name="movie" value="flash/ledgrey.swf">
<param name="quality" value="high">
<embed src="flash/ledgrey.swf" quality="high" pluginspage="http://www.ma
</object>
<%else%>
<%end if%>
</div>
</div><!--#Her ender GLOBAL_MAIN-->
</div><!--#Her ender GLOBAL-->
</html>
<%
RSTid.Close()
Set RSTid = Nothing
%>
What's wrong??????
Any help would be highly appreciated!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: hongjunPosted on 2005-10-15 at 09:55:38ID: 15091787
You may try this
j) : document.getElementsByTagN ame("TABLE ")[obj];
TR");
dColor = eval('color'+(i % 2));
You may try this
function altRowColors(){ //v2.0
var args = arguments, obj, color0, color1, rowList;
for(var a = 0; a < args.length; a+=3){
obj = args[a+0]; color0 = args[a+1]; color1 = args[a+2];
obj = (isNaN(obj)) ? document.getElementById(ob
if(obj) {
rowList = obj.getElementsByTagName("
for(var i = 0; i < rowList.length; i++) rowList[i].style.backgroun
}
}
}
I placed the for loop into the if statement. Problem occurs because obj does not evaluate to true and so rowList is undefined. This resulted in the error if the for loop is outside the if statement.