hi,
I was new in asp programming, i facing some problem with my asp script. How could i display the multiple records on my display table? Below is my form asp page:
ship_inventory.asp
------------------------------------------
<html>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" background="../_themes/spokes/spotxtr.gif">
<script>
function populate(inForm)
{
document.myform.addlist.options[document.myform.addlist.options.length]=new Option(document.myform.shipno.value,document.myform.shipno.value)
}
</script>
<center>
<p>
<hr>
<h3>Ship Inventory
<br>
<form name=myform action="shipno1.asp" method=post>
<table border=1 cellpadding=4>
<tr><td>shipno input :
<td><input type=text name=shipno size=30 maxlength=15>
<tr>
<td>shipno added:
<td><select name=addlist multiple>
</select>
<input type=button value="add" onClick="populate(this.form)">
</table>
<br>
<input type=submit value=Display>
<input type=reset value=reset>
</form></center>
</body>
</html>
---------------------------------------------------------
for example:- I have 6 shipment number already added into listbox. After query complete i want this 6 shipment number
at the same time display on the display table include all
it's fields and records. Below is my asp query page:
shipno1.asp
---------------------------------------------------------
<%
shipid = request("addlist"
set cn = server.createobject("adodb.connection"
cn.open "Provider=MSDAORA.1;Password=developergrp;User ID=yts;Data Source=mtfdb;Persist Security Info=True;"
set rs = cn.execute("select shipno,partno,product,remark||wafer remark,qty00,qty01,mtfno from mtfmaster " & _
"where shipno='" & shipid & "'" & _
"order by shipno,partno,remark"
%>
<html>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" background="../_themes/spokes/spotxtr.gif">
<p>
<HR>
<H3><center>Result List</center></H3>
<BR>
<center><a href=" to ship inventory</a></center>
<br>
<%
if shipid="" then
Response.Write "<center>" & "<h4>" & "Shipno required. View cannot continue." & "</center>"
Response.End
end if
if len(shipid)<8 then
Response.Write "<center>" & "<h4>" & "shipno must be at least 8 number!" & "</center>"
Response.End
end if
if len(shipid)>8 then
Response.Write "<center>" & "<h4>" & "shipno must be at least 8 number!" & "</center>"
Response.End
end if
if not isnumeric(shipid) then
Response.Write "<center>" & "<h4>" & "shipno must be a number." & "</center>"
Response.End
end if
%>
<%
if rs.eof then
Response.Write "<center>" & "<h4>" & "<font color=red>no data found"
Response.End
end if
%>
<center><TABLE BORDER=1 CELLPADDING=4>
<tr>
<TD>shipno
<TD>partno
<td>desc.
<td>w/code
<td>qty00
<td>qty01
<td>mtfno
<tr>
<%
do until rs.eof
Response.Write "<tr>"
Response.Write "<td>" & rs("shipno"
Response.Write "<td>" & rs("partno"
Response.Write "<td>" & rs("product"
Response.write "<td>" & rs("remark"
Response.write "<td>" & rs("qty00"
Response.write "<td>" & rs("qty01"
Response.Write "<td>" & rs("mtfno"
rs.movenext
loop
%>
</table>
<%
response.write "<h4>" & "Done"
%>
</body>
</html>
<%
rs.close
cn.close
set rs=nothing
set cn=nothing
%>
-------------------------------------------------------
so, how do i write the script to call out this fucntion?
can somebody help me!!
thanks for person would help me out on this problem
I was new in asp programming, i facing some problem with my asp script. How could i display the multiple records on my display table? Below is my form asp page:
ship_inventory.asp
------------------------------------------
<html>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" background="../_themes/spokes/spotxtr.gif">
<script>
function populate(inForm)
{
document.myform.addlist.options[document.myform.addlist.options.length]=new Option(document.myform.shipno.value,document.myform.shipno.value)
}
</script>
<center>
<p>
<hr>
<h3>Ship Inventory
<br>
<form name=myform action="shipno1.asp" method=post>
<table border=1 cellpadding=4>
<tr><td>shipno input :
<td><input type=text name=shipno size=30 maxlength=15>
<tr>
<td>shipno added:
<td><select name=addlist multiple>
</select>
<input type=button value="add" onClick="populate(this.form)">
</table>
<br>
<input type=submit value=Display>
<input type=reset value=reset>
</form></center>
</body>
</html>
---------------------------------------------------------
for example:- I have 6 shipment number already added into listbox. After query complete i want this 6 shipment number
at the same time display on the display table include all
it's fields and records. Below is my asp query page:
shipno1.asp
---------------------------------------------------------
<%
shipid = request("addlist"
set cn = server.createobject("adodb.connection"
cn.open "Provider=MSDAORA.1;Password=developergrp;User ID=yts;Data Source=mtfdb;Persist Security Info=True;"
set rs = cn.execute("select shipno,partno,product,remark||wafer remark,qty00,qty01,mtfno from mtfmaster " & _
"where shipno='" & shipid & "'" & _
"order by shipno,partno,remark"
%>
<html>
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" background="../_themes/spokes/spotxtr.gif">
<p>
<HR>
<H3><center>Result List</center></H3>
<BR>
<center><a href=" to ship inventory</a></center>
<br>
<%
if shipid="" then
Response.Write "<center>" & "<h4>" & "Shipno required. View cannot continue." & "</center>"
Response.End
end if
if len(shipid)<8 then
Response.Write "<center>" & "<h4>" & "shipno must be at least 8 number!" & "</center>"
Response.End
end if
if len(shipid)>8 then
Response.Write "<center>" & "<h4>" & "shipno must be at least 8 number!" & "</center>"
Response.End
end if
if not isnumeric(shipid) then
Response.Write "<center>" & "<h4>" & "shipno must be a number." & "</center>"
Response.End
end if
%>
<%
if rs.eof then
Response.Write "<center>" & "<h4>" & "<font color=red>no data found"
Response.End
end if
%>
<center><TABLE BORDER=1 CELLPADDING=4>
<tr>
<TD>shipno
<TD>partno
<td>desc.
<td>w/code
<td>qty00
<td>qty01
<td>mtfno
<tr>
<%
do until rs.eof
Response.Write "<tr>"
Response.Write "<td>" & rs("shipno"
Response.Write "<td>" & rs("partno"
Response.Write "<td>" & rs("product"
Response.write "<td>" & rs("remark"
Response.write "<td>" & rs("qty00"
Response.write "<td>" & rs("qty01"
Response.Write "<td>" & rs("mtfno"
rs.movenext
loop
%>
</table>
<%
response.write "<h4>" & "Done"
%>
</body>
</html>
<%
rs.close
cn.close
set rs=nothing
set cn=nothing
%>
-------------------------------------------------------
so, how do i write the script to call out this fucntion?
can somebody help me!!
thanks for person would help me out on this problem