Using a Non-Existant Variable
Posted: Tue Jan 15, 2008 1:54 am
Hello everybody,
My task is to make some changes to a certain webpage and they gave me access to their site ftp. I downloaded the necessary files and looking at the code:
Basically, I researched a little (I am new to web programming) and found out that this is a dynamic drop down list. All the tutorials showed explicit data that would go into the drop down list. However, in the code above, the variable category_list is nowhere to be found in that file. What is going on? How is it accessing the data?
My task is to make some changes to a certain webpage and they gave me access to their site ftp. I downloaded the necessary files and looking at the code:
Code: Select all
<script language="javascript">
function GoToNextCost(el) {
var idx = el.selectedIndex;
var term = el.options[idx].value;
location.href='index.php?term='+term;
}
</script>
<FORM METHOD="POST" NAME="form1">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../html/images/uni02_title01.gif"></td>
</tr>
<tr>
<td height="30"></td>
</tr>
<tr>
<td height="45">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td><img src="../html/images/uni02_subtitle01.gif"></td>
<td align="right">
<select name="term" onChange="GoToNextCost(this)">
<OPTION VALUE="">Choose</OPTION>
<!-- LOOP START 'category_list' -->
<OPTION VALUE="{{category_list.name}}">{{category_list.name}}</OPTION>
<!-- LOOP END 'category_list' -->
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="1" bgcolor="DCDCDC"></td>
</tr>
<tr>
<td height="15"></td>
</tr>
</table>
</FORM>