Answerred in your other post.
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"neebie" <webforumsuser@macromedia.com> wrote in
message
news:g4ipjl$p6a$1@forums.macromedia.com...
>I have been struggling with this one for a while and it
is driving me
>crazy.
> Any help is greatly appreciated. What I am trying to do
it to build a
> simple
> search page with one parameter and a results page. Both
pages work as they
> are
> supposed other than when the user doesn't have a record
in my database it
> won't
> show a message telling them there is not a record found.
>
> I have read and read and I no this is the show/hide
region if empty. I
> have
> highlighted the text I want the user to see and tried to
show it if
> recordset
> is empty. It is not working, it isn't even showing it
being dynamic.
> Someone
> please help! Please!
>
>
> I am using Dreamweaver CS3, ASP, and SQL Server
>
>
>
>
>
>
> <!--The Search page Code -->
>
>
>
>
> <%@LANGUAGE="VBSCRIPT"%>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="
http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
> <title>Untitled Document</title>
> <script type="text/javascript">
> <!--
> function MM_validateForm() { //v4.0
> if (document.getElementById){
> var
>
i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
> for (i=0; i<(args.length-2); i+=3) { test=args[i+2];
> val=document.getElementById(args
);
> if (val) { nm=val.name; if ((val=val.value)!="") {
> if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
> if (p<1 || p==(val.length-1)) errors+='- '+nm+' must
contain an
> e-mail address.\n';
> } else if (test!='R') { num = parseFloat(val);
> if (isNaN(val)) errors+='- '+nm+' must contain a
number.\n';
> if (test.indexOf('inRange') != -1) {
p=test.indexOf(':');
> min=test.substring(8,p); max=test.substring(p+1);
> if (num<min || max<num) errors+='- '+nm+' must
contain a
> number
> between '+min+' and '+max+'.\n';
> } } } else if (test.charAt(0) == 'R') errors += '-
'+nm+' is
> required.\n'; }
> } if (errors) alert('The following error(s)
occurred:\n'+errors);
> document.MM_returnValue = (errors == '');
> } }
> //-->
> </script>
> </head>
>
> <body>
> <form action="Search_Results.asp" method="post"
name="form1" id="form1"
> onsubmit="MM_validateForm('Email','','RisEmail');return
> document.MM_returnValue">
> <label>
> <input type="text" name="Email" id="Email" />
> </label>
> <label>
> <input type="submit" name="search" id="search"
value="search" />
> </label>
> </form>
> </body>
> </html>
>
>
>
>
>
>
>
>
>
>
>
> <!-- The results page code -->
>
>
> <%@LANGUAGE="VBSCRIPT"%>
> <!--#include
file="Connections/GCFA_Council_Members.asp" -->
> <%
> Dim rs_Results__MMColParam
> rs_Results__MMColParam = "1"
> If (Request.Form("Email") <> "") Then
> rs_Results__MMColParam = Request.Form("Email")
> End If
> %>
> <%
> Dim rs_Results
> Dim rs_Results_cmd
> Dim rs_Results_numRows
>
> Set rs_Results_cmd = Server.CreateObject
("ADODB.Command")
> rs_Results_cmd.ActiveConnection =
MM_GCFA_Council_Members_STRING
> rs_Results_cmd.CommandText = "SELECT Username FROM
dbo.GCFA_Council_Member
> WHERE Email = ?"
> rs_Results_cmd.Prepared = true
> rs_Results_cmd.Parameters.Append
rs_Results_cmd.CreateParameter("param1",
> 200,
> 1, 20, rs_Results__MMColParam) ' adVarChar
>
> Set rs_Results = rs_Results_cmd.Execute
> rs_Results_numRows = 0
> %>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="
http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
> <title>Untitled Document</title>
> </head>
> <body>
> <p>This is your Username:
>
<%=(rs_Results.Fields.Item("Username").Value)%></p>
>
> <% If rs_Results.EOF And rs_Results.BOF Then %>
> <p>No results was found</p>
> <% End If ' end rs_Results.EOF And rs_Results.BOF
%>
> </body>
> </html>
> <%
> rs_Results.Close()
> Set rs_Results = Nothing
> %>
>