L
led
it is possible to submit a form based on result of a asp function??
this is the function:
<%
Function fp1_onsubmit
Dim myConnString
Dim myConnection
Dim rs
myConnString = Application("basededados1_ConnectionString")
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.Open myConnString
set rs=Server.CreateObject("ADODB.recordset")
rs.Open "Select precos.* from precos where cod_casa=" & request("cod_casa")
& " And livre= false", myConnString
do while not rs.eof
for i = rs.fields.item("inicio") to rs.fields.item("fim")
if i= request("inicio") then
fp1_onsubmit=false
end if
next
rs.movenext
loop
myConnection.Close
Set myConnection = Nothing
end Function
%>
but when i submit the form the expected doesn't happen
where is the problem?
this is the function:
<%
Function fp1_onsubmit
Dim myConnString
Dim myConnection
Dim rs
myConnString = Application("basededados1_ConnectionString")
Set myConnection = Server.CreateObject("ADODB.Connection")
myConnection.Open myConnString
set rs=Server.CreateObject("ADODB.recordset")
rs.Open "Select precos.* from precos where cod_casa=" & request("cod_casa")
& " And livre= false", myConnString
do while not rs.eof
for i = rs.fields.item("inicio") to rs.fields.item("fim")
if i= request("inicio") then
fp1_onsubmit=false
end if
next
rs.movenext
loop
myConnection.Close
Set myConnection = Nothing
end Function
%>
but when i submit the form the expected doesn't happen
where is the problem?