Jump to content

cool349

Members
  • Posts

    12
  • Joined

  • Last visited

About cool349

  • Birthday 01/10/1982

cool349's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. this is not for a online based website i'm working in a cd based website
  2. hellocan anyone help me with a script for to set the browser size too fullscreen a simple way please
  3. cool349

    please hel me

    can someone plaese help me i have a search engine on my webpage and i want to split the resultpage in a number smaller resultpages this is what i have now:<%'Hieronder kun je het pad naar de database instellendim strConnstrConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("db.mdb")'Hieronder vraag je om de twee variabelen die van index.asp komendim strSearchdim strTypestrSearch = request.form("search")strType = request.querystring("type")'Als er geen zoekwoorden ingevuld zijnif request.form("search") = "" thenstrSearch = "Je hebt geen zoekterm ingevuld"end if'Hier vervang je eventuele tekens die als html en commentaar worden gezien'Daar kan index.asp op vastlopenstrSearch = replace(strSearch,"<","")strSearch = replace(strSearch,">","")strSearch = replace(strSearch,"'","''")'Hier declareer je wat variabelen voor laterdim strTitledim strContentdim strSQLdim adoRs'Hier wordt de connectie met de database gemaaktset adoCn = Server.CreateObject("ADODB.Connection")set adoRs = Server.CreateObject("ADODB.Recordset")if request.form("type") = "bloeitijd" thenwhereclause=" where (bloeitijd LIKE '%" & strSearch & "%')"else if request.form("type") = "hoogte" then whereclause=" where (hoogte LIKE '%" & strSearch & "%')" else if request.form("type") = "standp" then whereclause=" where (standp LIKE '%" & strSearch & "%')" else if request.form("type") = "kleur" Then whereclause=" where (kleur LIKE '%" & strSearch & "%')" else whereclause=" where (nl_naam LIKE '%" & strSearch & "%' OR plantnaam LIKE '%" & strSearch & "%')"end ifend ifend ifend if'Hier is de querystring met een whereclause die verderop wordt uitgelegdstrSQL="select * from tbl_content " & whereclause'Hier wordt de recordset geopendadoRS.Open strSQL, strConn, 3'Deze functie is om eventuele html code uit de getoonde zoekresultaten te halen'Daar kan de vormgeving van search.asp op vastlopen%><html><head><title>Hebbink.com - tutorials - Een zoekmachine maken</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body bgcolor="#FFFFFF" text="#000000"><b>Searchresults for: </b><font size="4"><b><%=(strSearch)%></b></font><hr><%'Als er geen resultaten zijn gevondenif adoRs.EOF thenresponse.write("<b>Geen resultaten gevonden..<b><br><br>")end if%><%'Hier begint de loop, zolang er items in de recordset zittenDo While Not adoRs.EOF%><table border="0"> <tr> <td width="70" valign="top"><b><img src="<%=adoRs("thumb")%>" width="80" height="80"></b></td> <td valign="top"><a href="show.asp?id=<%=adoRs("id")%>"><%=adoRs("plantnaam")%></a></td> </tr></table><hr><%'Hier ga je naar het volgende item in de recordsetadoRs.MoveNext Loop%><a href="index.asp">opnieuw zoeken</a></body></html><%'Hier wordt de recordset afgeslotenadoRs.Close set adoRs = nothing%>
  4. thnx but how can i use it with this script<%'Hieronder kun je het pad naar de database instellendim strConnstrConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("db.mdb")'Hier kun je het aantal items per pagina instellendim intAantalintAantal = 1'Hier wordt de connectie met de database gemaaktdim adoCndim strSQLset adoCn = Server.CreateObject("ADODB.Connection")adoCn.Open strConn'Hier wordt de recordset opgehaald en in de SQL string is de gewenste volgorde en de "cursortype" opgegevendim adoRsset adoRs = Server.CreateObject("ADODB.Recordset")adoRs.CursorType = 1strSQL = "Select * From tbl_content order by id"adoRs.Open strSQL, adoCn, 3'Gedeelte om de page per page te regelendim intPageRecords, intRecords, intRecordCount, intCurrentPagedim intNumberOfPages, intDisplayPageintPageRecords = Request.Querystring("page")if intPageRecords = "" then intPageRecords = 1 : intRecords = 1intRecords = intPageRecordsintPageRecords = ((intPageRecords - 1) * intAantal) +1intRecordCount = 0%><html><head><title>ajuga</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body bgcolor="#FFFFFF" text="#000000"><%'Hier begint de loop, zolang er items in de recordset zitten'De recordset is onderverdeeld in stukje van 5 items (=intAantal)if not adoRs.EOF thenadoRs.Move (intPageRecords - 1)do while intRecordCount < intAantal and NOT adoRs.EOF%><center><table width="492" border="0"> <!--DWLayoutTable--> <tr> <td width="130" height="21" valign="top"><b>latijnse naam:</b></td> <td colspan="2" valign="top"><%=adoRs("plantnaam")%> </td> <br> <td width="65"> </td> </tr> <tr> <td height="21"><b>Nederlandse naam:</b></td> <td colspan="2" valign="top"><%=adoRs("nl_naam")%></td> <td> </td> </tr> <tr> <td height="21"><b>Hoogte:</b></td> <td colspan="2" valign="top"><%=adoRs("hoogte")%>cm</td> <td> </td> </tr> <tr> <td height="21"><b>Bloeitijd:</b></td> <td colspan="2" valign="top"><%=adoRs("bloeitijd")%></td> <td> </td> </tr> <tr> <td height="21"><b>Kleur:</b></td> <td colspan="2" valign="top"><%=adoRs("kleur")%></td> <td> </td> </tr> <tr> <td height="21" valign="top"><b>Standplaats:</b></td> <td colspan="2" valign="top"><%=adoRs("standp")%></td> <td> </td> </tr> <tr> <td height="204" colspan="2" valign="top"><b><img src="<%=adoRs("thumb")%>" width="227" height="202" border="0"></b></td> <td width="184"></td> <td></td> </tr> <tr> <td height="3"></td> <td width="93"></td> <td></td> <td></td> </tr></table></center><%'Hier loop je naar de volgende 5 (=intAantal) items in de recordsetadoRs.MoveNextintRecordCount = intRecordCount +1Loopend if%><br><% 'Als er items in de recordset zitten laat dan de page per page bediening zienif not adoRs.BOF then %><% 'Einde van de page per page bedieningend if %></body></html><%'Hier wordt de connectie afgeslotenadoRs.Close set adoRs = nothingadoCn.Close set adoCn = nothing%>
  5. well i mean whats between <tilte> </title> is it possible to load between that?to get what is written there to load it out of the databaseif it's possible please in asp
  6. hello i have a access database and i want to load out og the database in to a page using the title tagcan someone help me??
×
×
  • Create New...