0

hi there.

i created an xml, xsl, and html files and i need to create a drop down list that will allow me to quesry database


my xsl files is

<?xml version="1.0" ?>
- <Kwantlen>
- <Schedule>
<Semester>Summer</Semester>
<Department>CISY</Department>
<CourseName>Emerging Technologies</CourseName>
<Prerequisite>CISY1218</Prerequisite>
<CRN>2583</CRN>
<Days>Monday</Days>
<StartTime>16:00</StartTime>
<EndTime>19:00</EndTime>
<RoomNumber>G1045</RoomNumber>
<Instructor>Sen</Instructor>
<FinalDate>August 19</FinalDate>
</Schedule>
- <Schedule>
<Semester>Summer</Semester>
<Department>CISY</Department>
<CourseName>Data Structures</CourseName>
<Prerequisite>CISY2315</Prerequisite>
<CRN>5689</CRN>
<Days>Monday</Days>
<StartTime>10:00</StartTime>
<EndTime>12:00</EndTime>
<RoomNumber>G1045</RoomNumber>
<Instructor>Sen</Instructor>
<FinalDate>August 19</FinalDate>
</Schedule>
- <Schedule>
<Semester>Summer</Semester>
<Department>CISY</Department>
<CourseName>Information Systems Management</CourseName>
<Prerequisite>CISY2414</Prerequisite>
<CRN>1485</CRN>
<Days>Thursday</Days>
<StartTime>16:00</StartTime>
<EndTime>19:00</EndTime>
<RoomNumber>G3045</RoomNumber>
<Instructor>Chan</Instructor>
<FinalDate>August 19</FinalDate>
</Schedule>
</Kwantlen>

my xsl file is

<HTML xmlns:xsl="http://www.w3.org/TR/WD-xsl">
- <HEAD>
<TITLE>Assignment 1</TITLE>
</HEAD>
- <BODY>
- <TABLE BORDER="1">
- <TR>
<TD>Semseter</TD>
<TD>Department</TD>
<TD>Course Name</TD>
<TD>Course Prerequisite</TD>
<TD>CRN</TD>
<TD>Days</TD>
<TD>Start Time</TD>
<TD>End Time</TD>
<TD>Room Number</TD>
<TD>Instructor</TD>
<TD>Final Exam Date</TD>
</TR>
- <xsl:for-each select="Kwantlen/Schedule[Instructor='Sen']">
- <TR>
- <TD>
<xsl:value-of select="Semester" />
</TD>
- <TD>
<xsl:value-of select="Department" />
</TD>
- <TD>
<xsl:value-of select="CourseName" />
</TD>
- <TD>
<xsl:value-of select="Prerequisite" />
</TD>
- <TD>
<xsl:value-of select="CRN" />
</TD>
- <TD>
<xsl:value-of select="Days" />
</TD>
- <TD>
<xsl:value-of select="StartTime" />
</TD>
- <TD>
<xsl:value-of select="EndTime" />
</TD>
- <TD>
<xsl:value-of select="RoomNumber" />
</TD>
- <TD>
<xsl:value-of select="Instructor" />
</TD>
- <TD>
<xsl:value-of select="FinalDate" />
</TD>
</TR>
</xsl:for-each>
</TABLE>
</BODY>
</HTML>

and my html file is
Please look at the part colored in red as i can see the proble is there (the xml file and the xsl file are right.

<HTML>
<HEAD>
<TITLE>Assignment1</TITLE>
<SCRIPT>
function loadXML() {
xml=new ActiveXObject("microsoft.XMLDOM");
xml.load('Assignment2.xml');
xsl0=new ActiveXObject("microsoft.XMLDOM");
xsl0.load('xsl1.xsl');
xsl1=new ActiveXObject("microsoft.XMLDOM");
xsl1.load('xsl2.xsl');
xsl2=new ActiveXObject("microsoft.XMLDOM");
xsl2.load('xsl3.xsl');
xmlt=new Array();
xmlt[0]=xml.transformNode(xsl0);
xmlt[1]=xml.transformNode(xsl1);
xmlt[2]=xml.transformNode(xsl2);
xmlP.innerHTML=xmlt[0];
}
function changexsl(n) {
xmlP.innerHTML=xmlt[n];
}

</SCRIPT>


<SCRIPT TYPE="text/javascript">
<!--
function dropdown(mySel)
{
var myWin, myVal;
myVal = mySel.options[mySel.selectedIndex].value;
if(myVal)
{
if(mySel.form.target)myWin = parent[mySel.form.target];
else myWin = window;
if (! myWin) return true;
myWin.location = myVal;
}
return false;
}
//-->
</SCRIPT>

</HEAD>
<BODY onload="loadXML();">
<DIV ID="xmlP"></DIV>
<INPUT TYPE="radio" NAME="xstyle" CHECKED onclick="changexsl(0);">xsl1
<BR>
<INPUT TYPE="radio" NAME="xstyle" onclick="changexsl(1);">xsl2
<BR>

<FORM
ACTION="../cgi-bin/redirect.pl"
METHOD=POST onSubmit="return dropdown(this.gourl)">

<SELECT NAME="gourl">
<OPTION VALUE="">Choose an Option...

<OPTION VALUE="xsl3.xsl" > Select Sen
<OPTION VALUE="/" >Select Monday Classes
<OPTION VALUE="http://www.ninthwonder.com" >Select Emerging Technologies

</SELECT>

<INPUT TYPE=SUBMIT VALUE="Go">
</FORM>


</BODY>
</HTML>

what i need is that when i select the first option from the drop down list, i need to get all the rows with the word sen...

1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by 7arouf
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.