that I have already, when I click the button I get a response.write with the link,
but how can I make it to open the link i place of writing it in the windows
here is the code again with the link
http://bamo.dyndns.org/lgr/kookboek.asp
<%@ Language = VBScript %>
<%Option Explicit%>
<%Response.Buffer = True%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<%
dim strDataPath, strConnectString, objConnection, strWarmofKoud, strGroep, strTitel, strRecept, objRS, strSelected, strSQL
strWarmofKoud = Request.Form("WarmofKoud")
strGroep = Request.Form("Groep")
strTitel = Request.Form("Titel")
strRecept = Request.Form("Recept")
'set connection strings for entire application
strDataPath = server.MapPath("kookboek.mdb")
strConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;"_
+ " Data Source= " & strDataPath & ";"_
+ " Mode=Share Deny None;User Id=admin;PASSWORD=;"
if not IsObject("ojbConnection") then
set objConnection=Server.CreateObject("ADODB.Connectio n")
objConnection.ConnectionTimeout = 15
objConnection.CommandTimeout = 10
objConnection.Mode = 3 'adModeReadWrite
if objConnection.state = 0 then
objConnection.Open strConnectString
end if
end if
sub makeWarmofKoud()
if not isObject("objRS") then
set objRS=Server.CreateObject("ADODB.RecordSet")
end if
if objRS.state <> 0 then
objRS.close
end if
strSQL = "SELECT DISTINCT WarmofKoud FROM kookbtabel1 ORDER BY WarmofKoud"
objRS.open strSQL,objConnection,3,3
Response.Write("<option></option>" & VBCRLF )
do while not objRS.EOF
if objRS("WarmofKoud") = strWarmofKoud then
strSelected = " Selected "
else
strSelected = ""
end if
Response.Write("<option" & strSelected & ">" & objRS("WarmofKoud") & "</option>" & VBCRLF )
objRS.MoveNext
loop
objRS.Close
set objRS=Nothing
end sub
sub makeGroep()
if strWarmofKoud <> "" then
if not isObject("objRS") then
set objRS=Server.CreateObject("ADODB.RecordSet")
end if
if objRS.state <> 0 then
objRS.close
end if
strSQL = "SELECT DISTINCT Groep FROM kookbtabel1 WHERE WarmofKoud = '" & strWarmofKoud & "' ORDER BY Groep"
objRS.Open strSQL,objConnection,3,3
if objRS.eof then
Response.Write("<option>Geen Groepen Gevonden</option>")
else
Response.Write("<option>Selecteer Groep</option>" & VBCRLF )
do while not objRS.EOF
if objRS("Groep") = strGroep then
strSelected = " Selected "
else
strSelected = ""
end if
Response.Write("<option" & strSelected & ">" & objRS("Groep") & "</option>" & VBCRLF )
objRS.MoveNext
loop
end if
objRS.Close
set objRS=Nothing
else
Response.Write("<option>Selecteer Warm of Koud eerst</option>")
end if
end sub
sub makeTitel()
if strGroep <> "Selecteer Warm of Koud eerst" AND strGroep <> "Selecteer Groep" AND strGroep <>"" then
if not isObject("objRS") then
set objRS=Server.CreateObject("ADODB.RecordSet")
end if
if objRS.state <> 0 then
objRS.close
end if
strSQL = "SELECT DISTINCT Titel FROM kookbtabel1 WHERE Groep = '" & strGroep & "' ORDER BY Titel"
objRS.Open strSQL,objConnection,3,3
if objRS.eof then
Response.Write("<option>Geen titels gevonden</option>")
else
Response.Write("<option>Selecteer Titel</option>" & VBCRLF )
do while not objRS.EOF
if objRS("Titel") = strTitel then
strSelected = " Selected "
else
strSelected = ""
end if
Response.Write("<option" & strSelected & ">" & objRS("Titel") & "</option>" & VBCRLF )
objRS.MoveNext
loop
end if
objRS.Close
set objRS=Nothing
else
Response.Write("<option>Selecteer eerst een groep</option>")
end if
end sub
sub makeRecept()
if strTitel <> "Selecteer groep eerst" AND strTitel <> "Selecteer Titel" AND strTitel <>"" then
if not isObject("objRS") then
set objRS=Server.CreateObject("ADODB.RecordSet")
end if
if objRS.state <> 0 then
objRS.close
end if
strSQL = "SELECT DISTINCT Recept FROM kookbtabel1 WHERE Titel = '" & strTitel & "' ORDER BY Recept"
objRS.Open strSQL,objConnection,3,3
if objRS.eof then
Response.Write("<option>Geen Recept gevonden</option>")
else
Response.Write("<option>Selecteer Recept</option>" & VBCRLF )
do while not objRS.EOF
if objRS("Recept") = strRecept then
strSelected = " Selected "
else
strSelected = ""
end if
Response.Write("<option" & strSelected & ">" & objRS("Recept") & "</option>" & VBCRLF )
objRS.MoveNext
loop
end if
objRS.Close
set objRS=Nothing
else
Response.Write("<option>Selecteer eerst een groep</option>")
end if
end sub
%>
<SCRIPT LANGUAGE=javascript>
<!--
function submitWarmofKoud(){
var objForm = document.forms[0];
objForm.elements['Groep'].selectedIndex=0;
objForm.elements['Titel'].selectedIndex = 0;
objForm.submit();
}
function submitGroep(){
var objForm = document.forms[0];
objForm.elements['Titel'].selectedIndex = 0;
objForm.submit();
}
function submitForm(){
var objForm=document.forms[0];
objForm.Action['Recept'].selectedIndex = 0;
objForm.submit();
return true;
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<p align="center"><i><b>Ons Kookboek</b></i></p>
<FORM action="" method=POST id=form1 name=form1 onSubmit="return submitForm()">
<table border="0" width="100%" id="table1">
<tr>
<td width="350">Zoekt u een warm of koud gerecht?</td>
<td> <SELECT name="WarmofKoud" onChange="submitWarmofKoud()">
<%call makeWarmofKoud%>
</SELECT></td>
</tr>
<tr>
<td>Selecteer de groep waaronder het gerecht valt:</td>
<td> <SELECT name="Groep" onChange="submitGroep()">
<%call makeGroep%>
</SELECT></td>
</tr>
<tr>
<td>Selecteer een van de gerechten:</td>
<td> <SELECT name="Titel">
<%call makeTitel%>
</SELECT></td>
</tr>
</table>
<p> </p>
<p><INPUT type="submit" value="Opvragen" id=submit1 name=submit1></p>
<%call makeRecept%>
</FORM>
</BODY>
<%
objConnection.Close
set objConnection = Nothing
%>
</HTML>
Bart Moons