tripwater
06-29-2005, 06:57 PM
Hello,
I copied and pasted below the results of viewing source on one of my pages. It gets built dynamically with php and MYSQL.
I am currently getting an syntax error on line 98. I have no idea what it is. THe first time I visit the page, it is fine, but on the onchange event that reloads the page and passes back a query string for one of my queries, I then get the error.
<html>
<head>
<title>NizeX Project Management System</title>
</head>
<style type="text/css">
h1{color:black; font-size:18pt; text-align:left; font-family:arial,sans-serif}
h2{color:black; font-size:14pt font-family:arial,sans-serif font-weight:bold}
h3{color:black; font-size:10pt font-family:arial,sans-serif}
h4{color:black; font-size:9pt font-family:arial,sans-serif}
h5{color:black; font-size:12pt font-family:arial,sans-seriff}
.menu {color:white; font-size:12pt; text-align:center;
font-family:arial,sans-serif; font-weight:bold}
td {font-size:10pt; font-family:arial,sans-serif;}
p {color:black; font-size:10pt;
font-family:arial,sans-sarif}
font {color:black; font-size:9pt; text-align:left;
font-family:arial, sans-serif; font-weight:bold}
a {
color: 697bc7;
font-size:10pt;
font-family:arial,sans-sarif;
text-decoration:none;
}
a:hover {
color: red;
font-size:10pt;
font-family:arial,sans-sarif;
text-decoration:none;
}
a.colorchange{
color: 000000;
font-size:10pt;
font-family:arial,sans-sarif;
text-decoration:none;
}
a:hover.colorchange {
color: FFFFFF;
font-size:10pt;
font-family:arial,sans-sarif;
text-decoration:none;
}
body {font-face:arial,sans-sarif font-size:10pt; background:#c9d5e7}
ul {font-face:arial,sans-sarif font-size:10pt}
li {color:black; font-size:10pt;
font-family:arial,sans-sarif}
b {color:black}
</style>
<script language="JavaScript" type="text/javascript">
function TheFormCheck()
{
// set var checkbox_choices to zero
var checkbox_choices = 0;
// Loop from zero to the one minus the number of checkbox button selections
for (i = 0; i < document.tester.elements.length; i++)
{
if(document.tester.elements[i].type == 'checkbox')
if (document.tester.elements[i].checked)
{
checkbox_choices = checkbox_choices + 1;
}
}
}
<!--this function tells our select options to advance to the page assigned, on the onchange event-->
function doSel(obj)
{
for (i = 0; i < obj.length; i++)
{
if (obj[i].selected == true)
eval(obj[i].id);//THIS SHOULD BE LINE 98
}
}
function CheckAll()
{
for (var i = 0; i < document.tester.elements.length; i++)
{
if(document.tester.elements[i].type == 'checkbox')
document.tester.elements[i].checked =!(document.tester.elements[i].checked);
}
}
</script>
<body>
<form name="tester" method="post" action="../admin/assign_tester_task_submit.php" onSubmit="return TheFormCheck()";>
<table width=80% border=0>
<tr valign=top>
<td colspan=2>
Check the boxes beside the tester(s) you would like to assign to this task or select a preset testing group.
<br><br>
</td>
</tr>
<tr valign=top>
<td>
<b>Testing Groups</b><br>
<select name=group onchange="doSel(this)">
<option value ="" id="location.href='../main/assign_tester_task.php'"><--Group--><option value =9 id="location.href=../main/assign_tester_task.php?id=9" selected>Joe_and_Lyss<option value =7 id="location.href=../main/assign_tester_task.php?id=7">Main<option value =8 id="location.href=../main/assign_tester_task.php?id=8">Top</select><br><br>
</td>
</tr>
<tr valign=top>
<td width=275>
<input type=submit name=submit value="Assign to task"><br>
<b><a href="javascript:void(0)" onClick="CheckAll();">Toggle All</a></b><p>
<b>Testers</b><br>
<input type=hidden name=count value="10">
<input type=hidden name=adding value=yes><input type=checkbox name=0 value=12>Brian <br><input type=checkbox name=1 value=11>Chris <br><input type=checkbox name=2 value=17 checked>Elyssa <br><input type=checkbox name=3 value=35>Eric <br><input type=checkbox name=4 value=6>Glenn <br><input type=checkbox name=5 value=10>Jeff <br><input type=checkbox name=6 value=8>Jim <br><input type=checkbox name=7 value=9 checked>Joe <br><input type=checkbox name=8 value=22>test<br><input type=checkbox name=9 value=1>Tim <br> <p><input type=submit name=submit value="Assign to task"><br>
</td>
</tr>
</table></form>
</body>
</html>
Thanks for any help with this.
I copied and pasted below the results of viewing source on one of my pages. It gets built dynamically with php and MYSQL.
I am currently getting an syntax error on line 98. I have no idea what it is. THe first time I visit the page, it is fine, but on the onchange event that reloads the page and passes back a query string for one of my queries, I then get the error.
<html>
<head>
<title>NizeX Project Management System</title>
</head>
<style type="text/css">
h1{color:black; font-size:18pt; text-align:left; font-family:arial,sans-serif}
h2{color:black; font-size:14pt font-family:arial,sans-serif font-weight:bold}
h3{color:black; font-size:10pt font-family:arial,sans-serif}
h4{color:black; font-size:9pt font-family:arial,sans-serif}
h5{color:black; font-size:12pt font-family:arial,sans-seriff}
.menu {color:white; font-size:12pt; text-align:center;
font-family:arial,sans-serif; font-weight:bold}
td {font-size:10pt; font-family:arial,sans-serif;}
p {color:black; font-size:10pt;
font-family:arial,sans-sarif}
font {color:black; font-size:9pt; text-align:left;
font-family:arial, sans-serif; font-weight:bold}
a {
color: 697bc7;
font-size:10pt;
font-family:arial,sans-sarif;
text-decoration:none;
}
a:hover {
color: red;
font-size:10pt;
font-family:arial,sans-sarif;
text-decoration:none;
}
a.colorchange{
color: 000000;
font-size:10pt;
font-family:arial,sans-sarif;
text-decoration:none;
}
a:hover.colorchange {
color: FFFFFF;
font-size:10pt;
font-family:arial,sans-sarif;
text-decoration:none;
}
body {font-face:arial,sans-sarif font-size:10pt; background:#c9d5e7}
ul {font-face:arial,sans-sarif font-size:10pt}
li {color:black; font-size:10pt;
font-family:arial,sans-sarif}
b {color:black}
</style>
<script language="JavaScript" type="text/javascript">
function TheFormCheck()
{
// set var checkbox_choices to zero
var checkbox_choices = 0;
// Loop from zero to the one minus the number of checkbox button selections
for (i = 0; i < document.tester.elements.length; i++)
{
if(document.tester.elements[i].type == 'checkbox')
if (document.tester.elements[i].checked)
{
checkbox_choices = checkbox_choices + 1;
}
}
}
<!--this function tells our select options to advance to the page assigned, on the onchange event-->
function doSel(obj)
{
for (i = 0; i < obj.length; i++)
{
if (obj[i].selected == true)
eval(obj[i].id);//THIS SHOULD BE LINE 98
}
}
function CheckAll()
{
for (var i = 0; i < document.tester.elements.length; i++)
{
if(document.tester.elements[i].type == 'checkbox')
document.tester.elements[i].checked =!(document.tester.elements[i].checked);
}
}
</script>
<body>
<form name="tester" method="post" action="../admin/assign_tester_task_submit.php" onSubmit="return TheFormCheck()";>
<table width=80% border=0>
<tr valign=top>
<td colspan=2>
Check the boxes beside the tester(s) you would like to assign to this task or select a preset testing group.
<br><br>
</td>
</tr>
<tr valign=top>
<td>
<b>Testing Groups</b><br>
<select name=group onchange="doSel(this)">
<option value ="" id="location.href='../main/assign_tester_task.php'"><--Group--><option value =9 id="location.href=../main/assign_tester_task.php?id=9" selected>Joe_and_Lyss<option value =7 id="location.href=../main/assign_tester_task.php?id=7">Main<option value =8 id="location.href=../main/assign_tester_task.php?id=8">Top</select><br><br>
</td>
</tr>
<tr valign=top>
<td width=275>
<input type=submit name=submit value="Assign to task"><br>
<b><a href="javascript:void(0)" onClick="CheckAll();">Toggle All</a></b><p>
<b>Testers</b><br>
<input type=hidden name=count value="10">
<input type=hidden name=adding value=yes><input type=checkbox name=0 value=12>Brian <br><input type=checkbox name=1 value=11>Chris <br><input type=checkbox name=2 value=17 checked>Elyssa <br><input type=checkbox name=3 value=35>Eric <br><input type=checkbox name=4 value=6>Glenn <br><input type=checkbox name=5 value=10>Jeff <br><input type=checkbox name=6 value=8>Jim <br><input type=checkbox name=7 value=9 checked>Joe <br><input type=checkbox name=8 value=22>test<br><input type=checkbox name=9 value=1>Tim <br> <p><input type=submit name=submit value="Assign to task"><br>
</td>
</tr>
</table></form>
</body>
</html>
Thanks for any help with this.