here is the code tht i tried for this ....i hv not used temp table . i m facing following problem
1.I cant find the next 10 records on pressing first time after 10 it is coming 111 like tht
when i press second time then is comes ,i guess it might it due to for each item where item-num >= z.
z is value of last item-num tht i fetch when page loaded first time .
2. also i cant able to get next to next record i mean from 1- 10 recoding on page loading on first press 10- 20 record coming but not serially .then on 3rd time pressing next 20 -30 record not coming .
3 . i want to pass value of item which is shown on table in another page , i m simply able to go in in next how to send and how to get value at tht page .
kindly help me.......... i
------------------------------------------------------------------------------------
<html>
<title>Sports data List</title>
</head>
<body>
<html>
<FORM method="post">
<H1>Customer Item Information</H1>
</hr>
<table border>
<tr bgcolor="red">
<th Id ></th>
<th>Item Name</th>
<th>Price</th>
<th>on hand</th>
<th>Allocated </th>
<th>Re-Order</th>
<th>on-order</th>
<th>cat-Page</th>
</tr>
<script language="speedscript">
def var i as int initial "1".
def var x as int no-undo.
def var z as integer .
For each item no-lock:
if i<=10 then do :
</script>
<tr>
<td align=left><a href="practice.html?"`item-num`"" >`Item-num`</td>
<td align=left>`Item-name`</td>
<td align=left>`Price`</td>
<td align=left>`on-hand`</td>
<td align=left>`Allocated`</td>
<td align=left>`Re-Order`</td>
<td align=left>`on-order`</td>
<td align=left>`cat-page`</td>
</tr>
<script language="speedscript">
i = i + 1.
if i = 10 then do:
assign x = item-num.
</script>
<input name="x" value="`x`" >
<script language="speedscript">
end.
END.
else
leave.
end.
</script>
<script language=javascript>
function test()
{
var a;
if(document.getElementById("x").value == "")
{
alert("Please enter...!");
return false;
}
}
</script>
<form name="onclick-test" method="post" onsubmit="return test()">
<!--WSS
assign z = integer(get-value("x")). ##1
i = 0.
For each item where item-num >= z no-lock: -- this is not good technicque to fetch next record .
if i<=10 then do :
-->
<tr>
<td align=left><a href="practice.html?"`item-num`"" >`Item-num`</td>
<td align=left>`Item-name`</td>
<td align=left>`Price`</td>
<td align=left>`on-hand`</td>
<td align=left>`Allocated`</td>
<td align=left>`Re-Order`</td>
<td align=left>`on-order`</td>
<td align=left>`cat-page`</td>
</tr>
<script language="speedscript">
i = i + 1.
if i = 9 then do:
assign x = item-num.
</script>
<input name="x" value="`x`" > ---- on press submit button this should get stored at ##1 to fetch next 8 record .
<script language="speedscript">
end.
END.
else
leave.
end.
</script>
<BR><BR>
<input type="submit" name=btn value="press" onsubmit=test()>
</form>
</html>