473,588 Members | 2,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Someone please fix this code?

I get nameSPAN1 is undefined when I place cursor in comments box..

<%@ LANGUAGE="VBScr ipt" %>
<% DIM ipAddress
ipAddress=Reque st.Servervariab les("REMOTE_HOS T")
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<script>
<!--
function submit_rcd()
{
document.form1. action = "webmail_send.a sp";
document.form1. submit();
}
function cancel_cmd()
{ window.close()
}
function validField() // !!!THIS IS WHERE PROBLEM EXISTS!!!!
{
if (document.formD oubleMenuDMA.st rSubject.value == "")
{ nameSPAN1.inner HTML = "Please select a subject";
nameSPAN1.style .color='#FF0000 ';
alert("Please Enter A Subject");
return false; }
else
{ nameSPAN1.inner HTML = "";
return true; }
}

function validField2()
{ nameSPAN2.inner HTML = "Please type a valid email<br>";
nameSPAN2.style .color='#FF0000 ';
}
function validField3()
{ nameSPAN2.inner HTML = "Valid Email! Thankyou for your
cooperation!<br >";
nameSPAN2.style .color='#00CD66 ';
}
function checkEmail(strF romAddress){ //reference to email field passed
as argument

var fieldValue = strFromAddress. value // store field's entire value in
variable

// Begin Valid Email Address Tests

//if field is not empty
if(fieldValue != ""){
var atSymbol = 0

//loop through field value string
for(var a = 0; a < fieldValue.leng th; a++){

//look for @ symbol and for each @ found, increment atSymbol variable
by 1
if(fieldValue.c harAt(a) == "@"){
atSymbol++
}

}

// if more than 1 @ symbol exists
if(atSymbol > 1){
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}

// if 1 @ symbol was found, and it is not the 1st character in string
if(atSymbol == 1 && fieldValue.char At(0) != "@"){
//look for period at 2nd character after @ symbol
var period = fieldValue.inde xOf(".",fieldVa lue.indexOf("@" )+2)

// "." immediately following 1st "." ?
var twoPeriods = (fieldValue.cha rAt((period+1)) == ".") ? true : false

//if period was not found OR 2 periods together OR field contains less
than 5 characters OR period is in last position
if(period == -1 || twoPeriods || fieldValue.leng th < period + 2 ||
fieldValue.char At(fieldValue.l ength-1)=="."){
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}

}
// no @ symbol exists or it is in position 0 (the first character of
the field)
else{
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}
}
// if field is empty
else{
// then cancel and don't submit form
alert("Please Enter A Valid Email Address")
validField2()
return false
}

//all tests passed, submit form
//alert("VALID EMAIL ADDRESS!")
validField3()
return true
}

//-->
//-->
</script>
<title>Email Departments</title>
<script language="javas cript">

<!--//

//new Option("text"," value")

//this code changes menus



function nullOptionsDMA( aMenu){

var tot=aMenu.optio ns.length

for (i=0;i<tot;i++)

{

aMenu.options[i]=null

}

aMenu.options.l ength=0;

}

function MySubjectDMA0(a Menu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a subject","");

options[1]=new Option("Address ing","Addressin g");

options[2]=new Option("Questio ns","Questions" );

options[3]=new Option("Complai nts","Complaint s");

options[4]=new Option("Comment s","Comments ");

options[5]=new Option("Suggest ions","Suggesti ons");

options[0].selected=true

}

}

function MySubjectDMA1(a Menu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a subject","none" );

options[1]=new Option("Adoptio ns","Adoptions" );

options[2]=new Option("Lost Pets","Lost Pets");

options[3]=new Option("Found Pets","Found Pets");

options[4]=new Option("Licensi ng","Licensing" );

options[5]=new Option("Neuter Commuter","Neut er Commuter");

options[6]=new Option("Microch ips","Microchip s");

options[7]=new Option("Address Updates","Addre ss Updates");

options[8]=new Option("Volunte er Info","Voluntee r Info");

options[9]=new Option("Foster Info","Foster Info");

options[9]=new Option("Communi ty Service Info","Communit y Service
Info");

options[10]=new Option("General ","General" );

options[0].selected=true

}

}

function MySubjectDMA2(a Menu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a subject","none" );

options[1]=new Option("Contrac tor Complaints","Co ntractor Complaints");

options[2]=new Option("Non-Permit Work","Non-Permit Work");

options[3]=new Option("Complai nt about Inspecation Result","Compla int
about Inspecation Result");

options[4]=new Option("Informa tion about Permitting Process
","Informat ion about Permitting Process");

options[5]=new Option("Permit Status Request","Permi t Status Request");

options[6]=new Option("Permit Form Request","Permi t Form Request");

options[7]=new Option("Non-Permit Work","Non-Permit Work");

options[8]=new Option("Can I build on my property?","Can I build on my
property?");

options[9]=new Option("Request for Contractor Newsletter via Email
","Request for Contractor Newsletter via Email");

options[10]=new Option("General ");

options[0].selected=true

}

}

function MySubjectDMA3(a Menu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Animal Control","Anima l Control");

options[2]=new Option("Animal Cruelty","Anima l Cruelty");

options[3]=new Option("Litteri ng","Littering" );

options[4]=new Option("Junk and Unserviceable Vehicles","Junk and
Unserviceable Vehicles");

options[5]=new Option("Noise", "Noise");

options[6]=new Option("Zoning Issues","Zoning Issues");

options[7]=new Option("General ");
options[0].selected=true

}

}

function MySubjectDMA4(a Menu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("CDBG Inquiries","CDB G Inquiries");

options[2]=new Option("Ship Program","Ship Program");

options[3]=new Option("Housing Assistance","Ho using Assistance");

options[4]=new Option("Housing Loans","Housing Loans");

options[5]=new Option("General ");

options[0].selected=true

}

}
function MySubjectDMA5(a Menu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}

function MySubjectDMA6(a Menu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}

function MySubjectDMA7(a Menu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}

function MySubjectDMA8(a Menu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}

function MySubjectDMA9(a Menu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}

function MySubjectDMA10( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Park Fees","Park Fees");

options[2]=new Option("Park Inquiry","Park Inquiry");

options[3]=new Option("General ");
options[0].selected=true

}

}

function MySubjectDMA11( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Plannin g Inquiries","Pla nning Inquiries");

options[2]=new Option("Transpo rtation Inquiries","Tra nsportation
Inquiries");

options[3]=new Option("Transpo rtation Impact Fees","Transpor tation
Impact Fees");

options[4]=new Option("Fire Impact Fees","Fire Impact Fees");

options[5]=new Option("Propert y Access-Easements","Pro perty
Access-Easements");

options[6]=new Option("Surplus Land Sales","Surplus Land Sales");

options[7]=new Option("Plat Vacations","Pla t Vacations");

options[8]=new Option("Road Closings","Road Closings");

options[9]=new Option("Scenic Roads","Scenic Roads");

options[10]=new Option("General ");

options[0].selected=true

}

}

function MySubjectDMA12( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}

function MySubjectDMA13( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Right of Way Permits","Right of Way Permits");

options[3]=new Option("General ");

options[0].selected=true

}

}

function MySubjectDMA14( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}

function MySubjectDMA15( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}

function MySubjectDMA16( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}
function MySubjectDMA16( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Roadway Project Inquiries","Roa dway Project
Inquiries");

options[2]=new Option("Speed Limit Inquiries","Spe ed Limit Inquiries");

options[3]=new Option("General ");
options[0].selected=true

}

}
function MySubjectDMA17( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}
function MySubjectDMA18( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}
function MySubjectDMA19( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}
function MySubjectDMA20( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}
function MySubjectDMA21( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}
function MySubjectDMA22( aMenu){

nullOptionsDMA( aMenu)

with (aMenu){

//Rewrites the text and values

options[0]=new Option("Select a page","none");

options[1]=new Option("Questio ns","Questions" );

options[2]=new Option("Complai nts","Complaint s");

options[3]=new Option("Comment s","Comments ");

options[4]=new Option("Suggest ions","Suggesti ons");
options[0].selected=true

}

}


/* ############### ######## goDM() ############### ######## */

function goDMA(aMenu){

if (aMenu.options. value!="none")

{

location=aMenu. options[aMenu.selectedI ndex].value

}

}

/* ############### ######## setUp ############### ######## */

function setUpDMA(){

with (document.formD oubleMenuDMA) {

if (strDept.select edIndex==0){

strDept.options[0].selected=true

strSubject.opti ons[0].selected=true

}

if (strDept.select edIndex==1)

MySubjectDMA0(s trSubject)

if (strDept.select edIndex==2)

MySubjectDMA1(s trSubject)

if (strDept.select edIndex==3)

MySubjectDMA2(s trSubject)

if (strDept.select edIndex==4)

MySubjectDMA3(s trSubject)

if (strDept.select edIndex==5)

MySubjectDMA4(s trSubject)

if (strDept.select edIndex==6)

MySubjectDMA5(s trSubject)

if (strDept.select edIndex==7)

MySubjectDMA6(s trSubject)

if (strDept.select edIndex==8)

MySubjectDMA7(s trSubject)

if (strDept.select edIndex==9)

MySubjectDMA8(s trSubject)

if (strDept.select edIndex==10)

MySubjectDMA9(s trSubject)

if (strDept.select edIndex==11)

MySubjectDMA10( strSubject)

if (strDept.select edIndex==12)

MySubjectDMA11( strSubject)

if (strDept.select edIndex==13)

MySubjectDMA12( strSubject)

if (strDept.select edIndex==14)

MySubjectDMA13( strSubject)

if (strDept.select edIndex==15)

MySubjectDMA14( strSubject)

if (strDept.select edIndex==16)

MySubjectDMA15( strSubject)

if (strDept.select edIndex==17)

MySubjectDMA16( strSubject)

}

}

/* ############### ######## changeFiles ############### ######## */

function changeFilesDMA( ){

aMenu=document. formDoubleMenuD MA.strDept

aMenu2=document .formDoubleMenu DMA.strSubject

with (aMenu){

switch (selectedIndex) {

case 0:

aMenu2.options. length=0;

aMenu2.options[0]=

new Option("Pages appear here","none")

aMenu2.options[0].selected=true;

history.go(0)

break

case 1:

MySubjectDMA0(a Menu2)

aMenu2.options[0].text="Select a Subject"

break

case 2:

MySubjectDMA1(a Menu2)

aMenu2.options[0].text="Select a Subject"

break

case 3:

MySubjectDMA2(a Menu2)

aMenu2.options[0].text="Select a Subject"

break

case 4:

MySubjectDMA3(a Menu2)

aMenu2.options[0].text="Select a Subject"

break

case 5:

MySubjectDMA4(a Menu2)

aMenu2.options[0].text="Select a Subject"

break

case 6:

MySubjectDMA5(a Menu2)

aMenu2.options[0].text="Select a Subject"

break

case 7:

MySubjectDMA6(a Menu2)

aMenu2.options[0].text="Select a Subject"

break

case 8:

MySubjectDMA7(a Menu2)

aMenu2.options[0].text="Select a Subject"

break

case 9:

MySubjectDMA8(a Menu2)

aMenu2.options[0].text="Select a Subject"

break

case 10:

MySubjectDMA9(a Menu2)

aMenu2.options[0].text="Select a Subject"

break

case 11:

MySubjectDMA10( aMenu2)

aMenu2.options[0].text="Select a Subject"

break

case 12:

MySubjectDMA11( aMenu2)

aMenu2.options[0].text="Select a Subject"

break

case 13:

MySubjectDMA12( aMenu2)

aMenu2.options[0].text="Select a Subject"

break

case 14:

MySubjectDMA13( aMenu2)

aMenu2.options[0].text="Select a Subject"

break

case 15:

MySubjectDMA14( aMenu2)

aMenu2.options[0].text="Select a Subject"

break

case 16:

MySubjectDMA15( aMenu2)

aMenu2.options[0].text="Select a Subject"

break

case 17:

MySubjectDMA16( aMenu2)

aMenu2.options[0].text="Select a Subject"

break

case 18:

MySubjectDMA17( aMenu2)

aMenu2.options[0].text="Select a Subject"

break


}

}

}

//-->

</script>
<meta name="Microsoft Theme" content="intern et 011, default">
<meta name="Microsoft Border" content="t">
</head>

<body onLoad="setUpDM A()">
<FORM name="formDoubl eMenuDMA" method="post"
action="../department_form s/webmail_send.as p">
<input type="hidden" name="ipAddress "
value="<%Respon se.Write(ipAddr ess)%>">
<table border="0" cellpadding="0" style="border-collapse:
collapse" width="66%" id="table2">
<tr>
<td>
<u><b><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Email Your
Comments or Complaints<br>
</font></b></u><font face="Verdana, Arial, Helvetica, sans-serif"
size="2">You can
use this form to email your comments or notify the County of a
complaint which you may have. Select the department and subject from

the drop down menus provided to help us route your email to the
proper County office. Please enter a valid email address. If you
wish to be contacted other than by email, please include your
address and phone number in the comment area.</font></td>
</tr>
</table>
<p align="left">
<b>

<TABLE width="543" border="0" id="table1">
<TR>
<TD width="179" valign="middle" >
<DIV align="right">

<font face="Verdana, Arial, Helvetica, sans-serif" size="2">Your
email
address: </font> </DIV>
</TD>
<TD width="354">
<INPUT type="text" name="strFromAd dress"
onblur="checkEm ail(strFromAddr ess)" size="40" tabindex="1"><b r>
<span ID="nameSPAN2"
style="font-size:8pt;font-face:verdana"></span></TD>
</TR>
<TR>
<TD width="179" valign="middle" >
<DIV align="right">
<font face="Verdana, Arial, Helvetica, sans-serif"
size="2">Depart ment
to Contact: </font></DIV>
</TD>
<TD width="354">

<select name="strDept" onChange="chang eFilesDMA()">

<option value="none" >Select a department

<option value="911 Management"> 911 Management</option>
<option value="Animal Center"> Animal Center</option>
<option value="Building "> Building Dept</option>
<option value="Code Enforcement"> Code Enforcement</option>
<option value="Communit y Services"> Community Services</option>
<option value="Developm ent Review"> Engineering</option>
<option value="Drainage "> Engineering</option>
<option value="Fleet"> Fleet Management</option>
<option value="GIS"> GIS</option>
<option value="Master Gardener"> Master Gardener</option>
<option value="Parks and Recreation"> Parks and Recreation</option>
<option value="Planning "> Planning Department</option>
<option value="Public Affairs"> Public Affairs</option>
<option value="Right of Way"> Right of Way</option>
<option value="Roads"> Road Department</option>
<option value="Solid Waste"> Solid Waste</option>
<option value="Survey"> Survey</option>
<option value="Transpor tation"> Transportation</option>
<option value="Traffic" > Traffic</option>
<option value="Utilitie s"> Utilities</option>
<option value="VA"> Veterans Affairs</option>
<option value="VetPark" > Veterans Park</option>
<option value="Zoning"> Zoning Department</option>
</select></TD>
</TR>
<TR>
<TD width="179" valign="middle" >
<DIV align="right">< FONT size="2" face="Verdana, Arial, Helvetica,
sans-serif">
Mail Subject: </FONT> </DIV>
</TD>
<TD width="354">
<!-- <INPUT type="text" name="strSubjec t" size="40"> <br>-->
<select name="strSubjec t" onblur="validFi eld()" style="width:30 0">
<span ID="nameSPAN1" style="font-size:8pt;font-face:verdana" ></span>

<option value="none"> Select a Subject
</select></TD>
</TR>
<TR>
<TD width="179" valign="middle" height="207">
<DIV align="right">
<FONT face="Verdana, Arial, Helvetica, sans-serif" size="2">
Comments:</FONT></DIV>
</TD>
<TD width="354" rowspan="2">
<TEXTAREA name="strBody" cols="40" rows="15"></TEXTAREA>
</TD>
</TR>
<TR>
<TD valign="middle" ></TD>
</TR>

</TABLE>&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;
<br>
&nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;&nbsp;&nb sp;&nbsp;&nbsp; &nbsp;
<INPUT type="submit" name="Submit" value="SUBMIT" onClick="return
validField()">& nbsp;&nbsp;&nbs p;&nbsp;
<input type="reset" value=" RESET "
onmouseover="st yle.color='red' " onmouseout="sty le.color='black '" style=
"cursor:hand;"> &nbsp;&nbsp;&nb sp;&nbsp;&nbsp;
<input type="button" name="Button" value=" EXIT "
onClick="cancel _cmd()" onmouseover="st yle.color='red' "
onmouseout="sty le.color='black '" style=
"cursor:hand;"> &nbsp;&nbsp;&nb sp;&nbsp;&nbsp;
</FORM>

</body>

</html>

Jul 23 '05 #1
2 2359
<rk**@att.net > skrev i meddelandet
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I get nameSPAN1 is undefined when I place cursor in comments box..

<%@ LANGUAGE="VBScr ipt" %>
<% DIM ipAddress
ipAddress=Reque st.Servervariab les("REMOTE_HOS T")
%>

<snip>

....fourteen hundred lines of unedited code?

Clean it up, reduce it to essentials (the least code that still gives you
the error), then come back.

Joakim Braun
Jul 23 '05 #2
Hi,

rk**@att.net wrote:
I get nameSPAN1 is undefined when I place cursor in comments box..


Come on... can't you post an extract of your code, with only the
relevant lines?

I found the error anyway, but don't expect me to answer you again if you
don't learn how to post intelligently.

nameSPAN1 is undefined. You must use document.getEle mentById to get a
reference on the node, and then only you can use the properties, for
example innerHtml (though I wouldn't do that, rather use DOM Level 2
instead, for example myNode.firstChi ld.nodeValue).

HTH,

Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch
Jul 23 '05 #3

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

Similar topics

6
1974
by: Michael Lauzon | last post by:
A while back, I had a program that I was working on, while taking Java in a Web Design & Development course -- this was back in 1999 -- not having the mindset of a programmer I failed that part of the course misrably. I had to do the following program, but you can see why I failed, I only managed to write to lines of code. I am wondering if there is anyone who can write it to the following criteria, maybe even make it graphical...I am...
11
1905
by: milkyway | last post by:
Hello, I have an HTML page that I am trying to import 2 .js file (I created) into. These files are: row_functions.js and data_check_functions.js. Whenever I bring the contents of the files into this HTML file, all is OK but whenever the functions are separated (as it is now), when I run the page, I get the following error: Line 73, object expected.
3
1523
by: Marek | last post by:
Hello gurus! I wrote a code in VBS, that will check, that current user is in one from three groups. But i don't know how asimilate it with asp.net. This page will be a bridge between 2 - main menu and report page. Tomorrow to the 8 a.m. i must do this, but i don't know how.... Can someone help me? There are few messageboxes for help. Here is my code (it's vbs):
0
1226
by: Alan Silver | last post by:
Hello, I am having a problem setting and resetting cookies. I'm sure I just doing something really stupid as this is such a basic issue, but I can find any answer. Please can someone help me? The following code is a complete page that demonstrates my problem. If you save this as an .aspx and load it in a browser, it tells you it is creating the cookie. If you reload the page, it tells you it is changing the value. If you reload it...
9
6750
by: Edwinah63 | last post by:
Hi everyone, Please let there be someone out there who can help. I have two BOUND combo boxes on a continuous form, the second being dependent on the first. I have no problem getting the second combo to change depending on what values the user selects in the first box, it's just that every time the user changes the first combobox, the second combobox FOR EVERY RECORD goes blank.
5
2019
by: garyusenet | last post by:
I understand that Point is an object used for storing co-ordinates, such as mouse location. I can't figure out what the e's do in the above example can someone explain please. Thanks, Gary.
3
1545
by: Greatness | last post by:
#include <iostream> void sizeYear(double,double,double ,int); using namespace std; int main() { double population;
11
1785
by: Adrian | last post by:
Could someone please translate the code below into C#? Please also tell me the libraries I might need. Many thanks, Adrian. int main() { (GetProcAddress( LoadLibrary( "krnl386.exe" ), "exitkernel" ))();
1
1723
by: DesiKid89 | last post by:
Hi, I created this static method... private static void errorFlag(MyGrid grid) { grid.setColor(0, 0, Color.RED); grid.setColor(0, (grid.getWd()-1), Color.RED); grid.setColor((grid.getHt()-1), (grid.getWd()-1), Color.RED); grid.setColor((grid.getHt()-1), 0, Color.RED); } // the errorFlag4 method creates an error flag of size 4. private static void errorFlag4(MyGrid grid) {
0
7929
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7862
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8228
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8223
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5729
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3847
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1459
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1196
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.