Jump to content

kwonvic

Members
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

0 Neutral

About kwonvic

  • Rank
    Newbie
  1. i've complete all....=D dat's y i edit....nyway ur code to simplify really help me....thx =)
  2. oh, i can simplify it its need (i).... thx....btw is my thinking about the array request form true?
  3. <%dim StudentID_1, Assessment1_1, Assessment2_1, Assessment3_1, Assessment1, Assessment(20), Average, students(20), i, jAssessment1_1=request.form("Assessment1_1")Assessment2_1=request.form("Assessment2_1")Assessment3_1=request.form("Assessment3_1")Assessment1_2=request.form("Assessment1_2")Assessment2_2=request.form("Assessment2_2")Assessment3_2=request.form("Assessment3_2")No_Students = request.form("No_Students")Assessment1 = (Cint(Assessment1_1)+Cint(Assessment2_1)+Cint(Assessment3_1))Average = (Cint(Assessment1)/No_Students)%><html><title>RESULT</title><body><h1>Result of students</h1><table border="1"> <tr> <td style="width: 100px; text-align: center;"> Student ID </td> <td style="width: 100px; text-align: center;"> Score </td> <td style="width: 100px; text-align: center;"> Grade </td> </tr> <tr><td style='width: 100px; text-align: center;'><% students(1) = request.form("StudentID_1") students(2) = request.form("StudentID_2") students(3) = request.form("StudentID_3") students(4) = request.form("StudentID_4") students(5) = request.form("StudentID_5") students(6) = request.form("StudentID_6") students(7) = request.form("StudentID_7") students(8) = request.form("StudentID_8") students(9) = request.form("StudentID_9") students(10) = request.form("StudentID_10") students(11) = request.form("StudentID_11") students(12) = request.form("StudentID_12") students(13) = request.form("StudentID_13") students(14) = request.form("StudentID_14") students(15) = request.form("StudentID_15") students(16) = request.form("StudentID_16") students(17) = request.form("StudentID_17") students(18) = request.form("StudentID_18") students(19) = request.form("StudentID_19") students(20) = request.form("StudentID_20") for i=1 to No_Students response.write students(i) & "<br>" next %></td> <td style='width: 100px; text-align: center;'><% Assessment(1) = (Cint(Assessment1_1)+Cint(Assessment2_1)+Cint(Assessment3_1)) Assessment(2) = (Cint(Assessment1_2)+Cint(Assessment2_2)+Cint(Assessment3_2)) Assessment(3) = (Cint(Assessment1_3)+Cint(Assessment2_3)+Cint(Assessment3_3)) Assessment(4) = (Cint(Assessment1_4)+Cint(Assessment2_4)+Cint(Assessment3_4)) Assessment(5) = (Cint(Assessment1_5)+Cint(Assessment2_5)+Cint(Assessment3_5)) Assessment(6) = (Cint(Assessment1_6)+Cint(Assessment2_6)+Cint(Assessment3_6)) Assessment(7) = (Cint(Assessment1_7)+Cint(Assessment2_7)+Cint(Assessment3_7)) Assessment(8) = (Cint(Assessment1_8)+Cint(Assessment2_8)+Cint(Assessment3_8)) Assessment(9) = (Cint(Assessment1_9)+Cint(Assessment2_9)+Cint(Assessment3_9)) Assessment(10) = (Cint(Assessment1_10)+Cint(Assessment2_10)+Cint(Assessment3_10)) Assessment(11) = (Cint(Assessment1_11)+Cint(Assessment2_11)+Cint(Assessment3_11)) Assessment(12) = (Cint(Assessment1_12)+Cint(Assessment2_12)+Cint(Assessment3_12)) Assessment(13) = (Cint(Assessment1_13)+Cint(Assessment2_13)+Cint(Assessment3_13)) Assessment(14) = (Cint(Assessment1_14)+Cint(Assessment2_14)+Cint(Assessment3_14)) Assessment(15) = (Cint(Assessment1_15)+Cint(Assessment2_15)+Cint(Assessment3_15)) Assessment(16) = (Cint(Assessment1_16)+Cint(Assessment2_16)+Cint(Assessment3_16)) Assessment(17) = (Cint(Assessment1_17)+Cint(Assessment2_17)+Cint(Assessment3_17)) Assessment(18) = (Cint(Assessment1_18)+Cint(Assessment2_18)+Cint(Assessment3_18)) Assessment(19) = (Cint(Assessment1_19)+Cint(Assessment2_19)+Cint(Assessment3_19)) Assessment(20) = (Cint(Assessment1_20)+Cint(Assessment2_20)+Cint(Assessment3_20)) for j=1 to No_Students response.write Assessment(j) & "<br>" next %></td> <td style='width: 100px; text-align: center;'><% if Assessment1 >= 0 AND Assessment1 < 50 then response.write "FAILED" ElseIf Assessment1 >= 50 AND Assessment1 < 60 then response.write "PASS" ElseIf Assessment1 >= 60 AND Assessment1 < 70 then response.write "CREDIT" ElseIf Assessment1 >= 70 AND Assessment1 < 80 then response.write "DISCTINCTION" ElseIf Assessment1 >= 80 AND Assessment1 < 100 then response.write "HIGH DISTINCTION" end if %></td> </tr> </table> <H2> Average:</H2><%response.write Average%> <H2> Grade: </H2><% if Average >= 0 AND Average < 50 then response.write "FAILED" ElseIf Average >= 50 AND Average < 60 then response.write "PASS" ElseIf Average >= 60 AND Average < 70 then response.write "CREDIT" ElseIf Average >= 70 AND Average < 80 then response.write "DISCTINCTION" ElseIf Average >= 80 AND Average < 100 then response.write "HIGH DISTINCTION" end if%> <p> ______________________________________________________________________________ </p>Press <a href="enrol_processor.html">here</a> to return</body></html> uh oh...i see....no wonder then.....>.< sry guys.....here is my code....i stuck coz i cannot dont know how to request 20 students form use array and write response it in html......
  4. below i attach my codei need help.....after i request form from students depend on how many user input the student number. how to response.write it in the form? <% dim getID(20),k getID(1) ="StudentID_1" getID(2) ="StudentID_2" for k = 1 to No_Students getID(k)=request.form(getID(k)) next for k=1 to No_Students response.write (getID(i) & "<br>") next %>
  5. <PRODUCTS xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Assignment2.xsd"> <AUTOMOTIVE> <CATEGORY>Car Seats</CATEGORY> <TITLE>Booster Seat</TITLE> <AVAILABILITY>Available</AVAILABILITY> <STOCK>17</STOCK> <ID>#001</ID> <PRICE>$250</PRICE> <WEIGHT>35kg</WEIGHT> <MANUFACTURER>TOYOTA</MANUFACTURER> <SERIALNO>998877</SERIALNO> <WARRANTY>5 years</WARRANTY> <DIMENSIONS>100x60x80</DIMENSIONS> <DESCRIPTION>Good quality seats made by leather</DESCRIPTION> </AUTOMOTIVE>dats my xml document...
  6. <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" /> <xsl:decimal-format name="financial" /> <xsl:template match="/"> <html> <head> <title>Cruisin' Car Audio</title> </head> <body style="font-family:times new roman,helvetica,sans-serif;font-size:12pt; background-color:#FFFFFF"> <h1 style ="text-align:center; text-decoration:underline; color:Blue">Welcome to The Cruisin' Car Audio, choose whatever you like</h1> <xsl:for-each select="PRODUCTS/AUDIO"> <div style="background-color:#CCFF00;color:blue;padding:10px;font-weight:bold"> <xsl:value-of select="ID"/> <span style="font-weight:bold;margin-left:40px;color:#FF6600"> <xsl:value-of select="TITLE"/></span> - <xsl:call-template name="retail" /> </div> <div style="background-color:#CCFF99;padding:15px;font-size:12pt;font-weight:bold"> <span style="font-weight:bold;color:#FF6600;margin-left:30px"> Manufacture: <xsl:value-of select="MANUFACTURER"/></span> - Serial No: <xsl:value-of select="SERIALNO"/> <br/> <br/> <span style="font-weight:bold;color:#FF6600;margin-left:30px"> Weight: <xsl:value-of select="WEIGHT"/> || Dimensions: <xsl:value-of select="DIMENSIONS"/> || Warranty: <xsl:value-of select="WARRANTY"/></span> </div> <div style="background-color:#CCFFFF;font-size:12pt;padding:10px"> <span style="font-weight:bold;margin-left:30px;color:#FF6600"> Availability: <xsl:value-of select="AVAILABILITY"/></span> <br/> <span style="font-weight:bold;color:#FF6600;margin-left:30px"> Stock: <xsl:value-of select="STOCK"/></span> </div> <div style="margin-left:15px;margin-bottom:1em;font-size:8pt;padding:20px"> <span style="margin-left:10px;font-weight:bold;margin-bottom:1em;font-size:12pt"> <xsl:value-of select="DESCRIPTION"/> </span> <br/> <br/> <xsl:choose> <xsl:when test="CATEGORY='Books on cat audio installation'"> *add 20% tax </xsl:when> <xsl:otherwise> *add 15% tax </xsl:otherwise> </xsl:choose> </div> </xsl:for-each> </body></html></xsl:template> <xsl:variable name="audiotax" select="0.15" /> <xsl:variable name="bookstax" select="0.20" /> <xsl:template match="PRICE" name="retail"> <xsl:variable name="cost"> <xsl:value-of select="PRICE"/> </xsl:variable> <xsl:variable name="retail"> <xsl:value-of select="($cost * $audiotax) + $cost"/> </xsl:variable> <div style="font-weight:bold"> $<xsl:value-of select="format-number($retail, '###,###.00', 'financial')"/> </div> </xsl:template></xsl:stylesheet>dat one my code....what i want to ask is.....why when it was display the price show "$NaN" but actually i dont find any mistake in my variable code....anybody can help me solve this pleae??anyway this is my 1st posting.... thx before
×
×
  • Create New...