Click to See Complete Forum and Search --> : drop down menu
jux82
12-20-2002, 09:34 PM
Hi,
Is there any simple to understand sample code to do a drop-down menu?
I look through the net but found that their examples are difficult to understand
Thanks
Beach Bum
12-20-2002, 09:43 PM
drop down menu - and - simple >> a contradiction in terms.
jux82
12-20-2002, 09:55 PM
ok, then what do you have? ;)
Charles
12-21-2002, 05:06 AM
And let us not forget that they simply do not work for a great number of users. Don't even get me started on those dynamic Javascript-based menu systems. They make you look cool like smoking makes you look cool. Use real links.
Mark Pilgrim (http://diveintoaccessibility.org/day_13_using_real_links.html)
hi,
<html dir="rtl">
<head>
</head>
<%@language=VBScript CodePage="1256"%>
<!-- #include file="adovbs.inc" -->
<%
dim db
Dim DB_CONNECTION
DB_CONNECTION = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.Mappath("./your DB") & ";"
Set db = Server.CreateObject("ADODB.Connection")
db.open DB_CONNECTION
%>
<%
num= request.form("num")
flag= request.form("flag")
%>
<%
Function AddF()
dim addsql
addSQL= " insert into yourtable (num,flag) values ('"&num&"','"&flag&"')"
db.execute(addSQL)
End Function
%>
<body>
<%
Dim objRecordset
dim sqls
%>
<form method="POST" action="yourpage.asp" onSubmit="">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="25%"> </td>
<td width="25%" align="left">
</td>
<td width="25%" align="left">
</td>
<td width="25%"> </td>
</tr>
<tr>
<td width="25%"> </td>
<td width="25%" align="left">
</td>
<td width="25%" align="left">
</td>
<td width="25%"> </td>
</tr>
<tr>
<td width="25%"> </td>
<td width="25%" align="left">
</td>
<td width="25%" align="left"> </td>
<td width="25%"> </td>
</tr>
<tr>
<td width="25%"> </td>
<td width="25%" align="left">number</td>
<td width="25%" align="left"> <select size="1" name="num">
<option selected>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select></td>
<td width="25%"> </td>
</tr>
<tr>
<td width="25%"> </td>
<td width="25%" align="left">any thing</td>
<td width="25%" align="left"> <select size="1" name="flag">
<option selected>yes</option>
<option>no</option>
</select></td>
</table>
<p align="center"><input type="submit" value="submit" name="B1"></p>
</form>
<%
AddF()
response.redirect "result.asp"
End If
%>
<%
db.close
set db=nothing
%>
</body>
</html>
roby