<%@ Language=VBScript %> <% dim l, b l = Request.Form("listid") b = Request.Form("pressed") Response.Write("L: " & l & " B: " & b) %> <html> <head> <script type="text/javascript"> function check() { var l = document.form1.listid.value; if(l != "") { document.form1.submit(); } else { return false; } } </script> </head> <body> <p>Enter numbers separated by a comma.</p> <form action="page1.asp" method="post" id="form1" name="form1" onsubmit="return false"> <p><input type="text" id="listid" name="listid" size="50" maxlength="1000" /> <input type="hidden" id="pressed" name="pressed" value="" /> </p> <p><input id="b1" name="b1" type="Submit" value="Submit" onclick="document.form1.pressed.value=this.name; check()" /> <input id="b2" name="b1" type="button" value="Reset" onclick="document.form1.reset()" /> </p> </form> </body> </html>