Hi, how do I have a few buttons, having each doing a different thing? 2 buttons are suppose to pass a string to a select statement in <body>, and another one acting as a submit button(this button is working fine). How do I make the 2 buttons (Group and Test Print) to pass on a string that gets into the select statement?? My code are below.. there's a mix of ASP and JS. Grateful for your advice please. Thank you.
Response.Write "<form name='refr' method='POST' action='./recp.asp?action=upd'>"
...
Response.Write "</table><p><input name='process' type='button' value='GROUP' onclick=transit('group')><input name='process' type='button' value='TEST PRINT' onclick=transit('tprint')><input name='process' type='submit' value='PRINT RECEIPTS'></p></form>"
%>
<script>
function transit(para){
if (para = 'group') {window.location.href = './recp.asp?reload'}
else if (para = 'tprint'){window.location.href=./recp.asp?testit'}
}
</script>
</head>
<body>
<%
dim saction
saction = cstr(Request.QueryString("action"))
select case saction
case "testit"
response.write "<p> Test Print button clicked"
case "reload"
response.write "<p>Group button clicked"
case "upd"
response.write "<p>Print button clicked"
end select
...
%>
Enter your message below
Sign in or Join us (it's free).