Ir para conteúdo

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

rafaeldupalio

Barra de rolagem Horizontal - pesquisa por parte de nome

Recommended Posts

* Galera fiz um select no banco mas na hora de exibir no html ficou mt embolado devido ao espaço como faço para colocar uma barra de rolagem?

 

*a segunda duvida como faço a pesquisar por parte de um nome do campo? pra ser mais pratico quero pesquisar na coluna nome do meu banco o funcionario "alex" mas so consigo encontrar se colocar o nome inteiro "Alex rosa da silva"

Compartilhar este post


Link para o post
Compartilhar em outros sites

Rafael blza,

 

Vc pode fazer um Scroll com CSS.

<style type="text/css">
#scroll {
  width:340px;
  height:170px;
  background-color:#F2F2F2;
  overflow:auto;
}

#espaco {
padding:5px;
}
</style>

Depois é só chamar a Div antes de seu Code.

<div id="scroll">

Seu Código...

</div>

Assim vc concentra seus dados no tamanho que vc determinar no CSS.

Compartilhar este post


Link para o post
Compartilhar em outros sites

A segunda dúvida sua Rafael, faça o seguinte:

 

Procure tópicos sobre "Auto Complete" isso irá ajudar nessa questão.

 

Estou postando um LINK de exemplo e com Download do mesmo, já dará uma ideia para vc.

Compartilhar este post


Link para o post
Compartilhar em outros sites

tem um código que postei, onde vc pode buscar, pela palavra (usando operador like), frase ou operadores And e Or. Dá uma procurada no fórum vai te ajudar

Compartilhar este post


Link para o post
Compartilhar em outros sites

tem um código que postei, onde você pode buscar, pela palavra (usando operador like), frase ou operadores And e Or. Dá uma procurada no fórum vai te ajudar

XANBURZUM sou mt noob vcs sabem mas como procuro somente no forum do asp?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Olá Rafael,

 

Veja alguns links usando o operador Like para consulta.

 

Link 1

 

Link 2

 

Link 3 ( Apanhado Geral )

 

É uma lógica simples de usar.

 

Obs nas consultas "Where Nome LIKE '%" irá procurar todos os nomes que contenham o critério da busca.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Olá Rafael,

 

Veja alguns links usando o operador Like para consulta.

 

Link 1

 

Link 2

 

Link 3 ( Apanhado Geral )

 

É uma lógica simples de usar.

 

Obs nas consultas "Where Nome LIKE '%" irá procurar todos os nomes que contenham o critério da busca.

var_pesq = session("vconsultar")
vSql = "SELECT * FROM TAB_FUNCIONARIOS_CYDER WHERE NOME LIKE '"&var_pesq&"'"
Set myRst = Server.CreateObject("ADODB.Recordset")
myRst.Open vSql, conn, 3, 3
if myRst.BOF and myRst.EOF then
Response.Write("<script language='JavaScript'>alert('Item Não encontrado!');location.href='funcionarios_cyder.html';</script>")
end if
nada ainda ele so busca pelo nome completo do campo e nao pelo oque digitei!

Compartilhar este post


Link para o post
Compartilhar em outros sites

Tente assim Rafael,

WHERE NOME LIKE '%" & var_pesq & "%'"

Compartilhar este post


Link para o post
Compartilhar em outros sites

Legal Rafael, é isso ai, só somando conhecimentos.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Rafael blza,

 

você pode fazer um Scroll com CSS.

<style type="text/css">
#scroll {
  width:340px;
  height:170px;
  background-color:#F2F2F2;
  overflow:auto;
}

#espaco {
padding:5px;
}
</style>

Depois é só chamar a Div antes de seu Code.

<div id="scroll">

Seu Código...

</div>

Assim você concentra seus dados no tamanho que você determinar no CSS.

wilnet a barra de rolangem nao funcionou nao na verdade nem apareceu vou colar a parte do html do meu asp.

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Quadro de Funcionários Cyder</title>
<style type="text/css">
body {
background-image: url();
font-size: 11px;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
.Subtitulo {
font-family: Tahoma, Geneva, sans-serif;
font-size: 12px;
font-weight: bold;
text-align: center;
}
.conteudo {
font-family: "Lucida Console", Monaco, monospace;
font-size: 11px;
}
.scroll {
width:1024px;
height:170px;
background-color:#F2F2F2;
overflow:auto;
}
.espaco {
padding:5px;
}
</style>
</head>
<body>
<div id="scroll">
<table width="100%" height="533" border="0" align="center">
<tr>
<td><table width="100%" border="0">
<tr>
<td width="800" height="122" align="center" valign="middle" class="Subtitulo"><img src="imagens/LOGOBR.jpg" width="288" height="126" /><br /></td>
</tr>
<tr>
<td height="44" align="center"><table width="100%" border="0">
<tr>
<th width="64" height="36" scope="col"><a href="cyder.html"><img src="imagens/home.gif" width="30" height="30" longdesc="cyder.html" /></a></th>
<th width="865" align="center" scope="col"><p><span class="Subtitulo">Quadro de Funcionários Cyder</span></p></th><hr><p class="conteudo">
<th width="81" scope="col"><a href="funcionarios_cyder.html"><img src="imagens/seta-voltar.gif" width="30" height="30" longdesc="funcionarios_cyder.html" /></a></th>
<table width="100%" border="1" cellpadding="" cellspacing=""><hr>
<tr>
<th width="5%" scope="col">Nome</th>
<th width="3%" scope="col">Matricula</th>
<th width="3%" scope="col">Status</th>
<th width="5%" scope="col">Local</th>
<th width="8%" scope="col">Pai</th>
<th width="4%" scope="col">Mae</th>
<th width="5%" scope="col">RG</th>
<th width="8%" scope="col">Exp</th>
<th width="5%" scope="col">CPF</th>
<th width="3%" scope="col">Titulo eleitor</th>
<th width="5%" scope="col">PIS</th>
<th width="8%" scope="col">Cart. Trab</th>
<th width="5%" scope="col">Sindicato</th>
<th width="5%" scope="col">Est. Civil</th>
<th width="3%" scope="col">Instrução</th>
<th width="4%" scope="col">Data Nasc.</th>
<th width="4%" scope="col">Naturalidade</th>
<th width="4%" scope="col">Nacionalidade</th>
<th width="10%" scope="col">End.</th>
<th width="8%" scope="col">Bairro</th>
<th width="4%" scope="col">Cidade</th>
<th width="4%" scope="col">CEP</th>
<th width="8%" scope="col">Telefone</th>
<th width="8%" scope="col">Cargo</th>
<th width="4%" scope="col">Setor</th>
<th width="5%" scope="col">Salário</th>
<th width="4%" scope="col">Data Admi.</th>
<th width="4%" scope="col">Data Demi.</th>
<th width="8%" align="center" scope="row">Exportar <a href="funcionarios_cyder_exportar.asp"><img src="imagens/export_excel.jpg" width="45" height="40" longdesc="funcionarios_cyder.html" /></a></th>
</tr>
<%
do while not myRst.EOF
var_codigo = myRst.fields("codigo")
var_NOME = myRst.fields("Nome")
var_MATRICULA = myrst.fields("Matricula")
var_SITUACAO = myrst.fields("situacao")
var_LOCAL = myrst.fields("local")
var_PAI = myrst.fields("nome_pai")
var_MAE = myrst.fields("nome_mae")
var_RG = myrst.fields("RG")
var_EXPEDICAO = myrst.fields("ORGAO_EXPEDICAO")
var_CPF = myrst.fields("cpf")
var_ELEITOR = myrst.fields("TITULO_ELEITOR")
var_PIS = myrst.fields("PIS")
var_CARTEIRA_TRABALHO = myrst.fields("CARTEIRA_TRABALHO")
var_SINDICATO = myrst.fields("SINDICATO")
var_CIVIL = myrst.fields("ESTADO_CIVIL")
Var_INSTRUCAO = myrst.fields("INSTRUCAO")
Var_NASC = myrst.fields("DATA_NASC")
var_NATURAL = myRst.fields("NATURALIDADE")
var_NACIO = myRst.fields("NACIONALIDADE")
var_END = myrst.fields("ENDERECO")
var_BAIRRO = myrst.fields("BAIRRO")
var_CIDADE = myrst.fields("MUNICIPIO")
var_CEP = myrst.fields("CEP")
var_TEL = myrst.fields("TELEFONE")
var_CARGO = myrst.fields("CARGO")
var_SETOR = myrst.fields("SETOR")
var_SALARIO = myrst.fields("SALARIO")
var_ADMISSAO = myrst.fields("ADMISSAO")
var_DEMISSAO = myrst.fields("DESLIGAMENTO")
%>
<tr>
<td height="0" align="center" valign="middle"><%=var_nome%></td>
<td align="center" valign="middle"><%=var_matricula%></td>
<td align="center" valign="middle"><%=var_situacao%></td>
<td align="center" valign="middle"><%=var_local%></td>
<td align="center" valign="middle"><%=var_Pai%></td>
<td align="center" valign="middle"><%=var_Mae%></td>
<td align="center" valign="middle"><%=var_rg%></td>
<td align="center" valign="middle"><%=var_expedicao%></td>
<td align="center" valign="middle"><%=var_CPF%></td>
<td align="center" valign="middle"><%=var_eleitor%></td>
<td align="center" valign="middle"><%=var_pis%></td>
<td align="center" valign="middle"><%=var_carteira_trabalho%></td>
<td align="center" valign="middle"><%=var_sindicato%></td>
<td align="center" valign="middle"><%=var_civil%></td>
<td align="center" valign="middle"><%=var_instrucao%></td>
<td align="center" valign="middle"><%=var_nasc%></td>
<td align="center" valign="middle"><%=var_natural%></td>
<td align="center" valign="middle"><%=var_Nacio%></td>
<td align="center" valign="middle"><%=var_end%></td>
<td align="center" valign="middle"><%=var_bairro%></td>
<td align="center" valign="middle"><%=var_cidade%></td>
<td align="center" valign="middle"><%=var_cep%></td>
<td align="center" valign="middle"><%=var_tel%></td>
<td align="center" valign="middle"><%=var_cargo%></td>
<td align="center" valign="middle"><%=var_setor%></td>
<td align="center" valign="middle"><%=var_salario%></td>
<td align="center" valign="middle"><%=var_admissao%></td>
<td align="center" valign="middle"><%=var_demissao%></td>
<th scope="col"><a href="funcionarios_cyder_form_alterar.asp?codigo=<%=var_codigo%>"><img src="imagens/user_male_edit.png" name="atualizar" width="30" height="30" id="atualizar" /></a></th>
<th scope="col"><a href="funcionarios_cyder_excluir.asp?codigo=<%=var_codigo%>"><img src="imagens/delete.png" name="deletar" width="30" height="30" id="deletar" /></a></th>
</tr>
<% myRst.MoveNext
loop
%>
</table>
</tr>
</table>
</tr>
</table>
</div>
</body>
</html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Tente assim:

<table width="100%" border="1" cellpadding="" cellspacing=""><hr>

<div id="scroll">
 
  <tr>
     <th width="5%" scope="col">Nome</th>
   </tr>
 <% myRst.MoveNext
loop
%> 
 
</div>

Eu mudei a posição da DIV Scroll.

 

Tente e teste.

Compartilhar este post


Link para o post
Compartilhar em outros sites

nada ainda wilnet

 

Tente assim:

<table width="100%" border="1" cellpadding="" cellspacing=""><hr>

<div id="scroll">
 
  <tr>
     <th width="5%" scope="col">Nome</th>
   </tr>
 <% myRst.MoveNext
loop
%> 
 
</div>

Eu mudei a posição da DIV Scroll.

 

Tente e teste.

Compartilhar este post


Link para o post
Compartilhar em outros sites

dá uma olhada neste code, onde vc pode pegar a frase exata, palavra, and e or

<% Option Explicit %>
<% 
'Set the response buffer to true.
Session.LCID="1046"
Response.Buffer = False 


Dim fsoObject			
Dim fldObject			
Dim sarySearchWord		
Dim strSearchWords		
Dim blnIsRoot			
Dim strFileURL			
Dim strServerPath		
Dim intNumFilesShown		
Dim intTotalFilesSearched	
Dim intTotalFilesFound		
Dim intFileNum			
Dim intPageLinkLoopCounter	
Dim sarySearchResults(1000,2)	
Dim intDisplayResultsLoopCounter 
Dim intResultsArrayPosition	
Dim blnSearchResultsFound	
Dim strFilesTypesToSearch	
Dim strBarredFolders		
Dim strBarredFiles		
Dim blnEnglishLanguage		
Const intRecordsPerPage = 10 
strFilesTypesToSearch = "htm,html,asp,shtml,txt,doc,gif,xml,xsl,aspx" 


strBarredFolders = "cgi_bin,_bin" 
strBarredFiles = "adminstation.htm,no_allowed.asp" 
blnEnglishLanguage = True 
intTotalFilesSearched = 0

%>
<html>
<head>
<title>Busca</title>
<meta name="Description" content="Search the web site for pages or information that you are after">
<meta name="KeyWords" content="site search">

     
       
<script  language="JavaScript">
var search_icon_off = new Image(); 
search_icon_off.src = "site_search_icon_off.gif";

function CheckForm () {

	if (document.frmSiteSearch.search.value==""){
		alert("Porfavor entre com uma ou mais palavras para a busca.");
		document.frmSiteSearch.search.focus();
		return false;
	}
	
	return true
}
</script>
       
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000CC" vlink="#0000CC" alink="#FF0000">
<h1 align="center"><font size="4" face="Verdana, Arial, Helvetica, sans-serif"><strong> 
  Busca</strong></font></h1>
  
<form method="get" name="frmSiteSearch" action="site_search.asp" onSubmit="return CheckForm();">
  <table cellpadding="0" cellspacing="0" width="90%" align="center">
    <tr> 
      
   <td height="66" width="165" align="right" rowspan="3" valign="middle"><img src="site_search_icon_on.gif" width="58" height="52" align="absmiddle" alt="Search the Web Site" name="searchIcon">   </td>
      <td height="66" width="15" align="right" rowspan="3" valign="middle"> </td>
      <td class="arial" height="4" width="571"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong>Pesquisa 
        no Site:</strong> </font></td>
    </tr>
    <tr> 
      <td class="normal" height="2" width="571">
      <input type="TEXT" name="search" maxlength="50" size="36" value="<% =Request.QueryString("search") %>">
        <input type="submit" value="Pesquisa >>" name="submit">
        </td>
    </tr>
    <tr> 
      <td class="normal" height="34" width="571" valign="top"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif">Pesquisa 
        em: 
        <input type="radio" name="mode" value="allwords" CHECKED>
        Todas as palavras 
        <input type="radio" name="mode" value="anywords">
        Qualquer palavra 
        <input type="radio" name="mode" value="phrase">
        Frase</font></td>
    </tr>
  </table>
</form>

<%

strSearchWords = Trim(Request.QueryString("search"))

If blnEnglishLanguage = True Then
	strSearchWords = Server.HTMLEncode(strSearchWords)

Else
	strSearchWords = Replace(strSearchWords, "<", "<", 1, -1, 1)
	strSearchWords = Replace(strSearchWords, ">", ">", 1, -1, 1)
End If

sarySearchWord = Split(Trim(strSearchWords), " ")



intFileNum = CInt(Request.QueryString("FileNumPosition"))

intNumFilesShown = intFileNum


Set fsoObject = Server.CreateObject("Scripting.FileSystemObject")


If NOT strSearchWords = "" Then


	Set fldObject = fsoObject.GetFolder("C:\Inetpub\wwwroot")
	
	strServerPath = fldObject.Path & "\"
	
	blnIsRoot = True
		
	Call SearchFile(fldObject)			
	
	Set fsoObject = Nothing
	Set fldObject = Nothing	
	
	
	Call SortResultsByNumMatches(sarySearchResults, intTotalFilesFound)
		
	
	Response.Write vbCrLf & "	<table width=""98%"" border=""0"" cellspacing=""1"" cellpadding=""1"" align=""center"" bgcolor=""#CCCCCC"">"
	Response.Write vbCrLf & " 	  <tr>"
	
	If blnSearchResultsFound = False Then 
		Response.Write vbCrLf & " 	    <td> Pesquisa nos arquivos por: <b>" & strSearchWords & "</b>.    Desculpe nenhum resultado encontrado.</td>"   
	
	Else	
		Response.Write vbCrLf & " 	    <td> Pesquisa nos arquivos por: <b>" & strSearchWords & "</b>.    Mostrando resultados " & intFileNum + 1 & " - " & intNumFilesShown & " of " & intTotalFilesFound & ".</td>"	    
	End If
	
	Response.Write vbCrLf & "	  </tr>"
	Response.Write vbCrLf & "	</table>"
		
	
	Response.Write vbCrLf & "	<table width=""95%"" border=""0"" cellspacing=""1"" cellpadding=""1"" align=""center"">"
	Response.Write vbCrLf & "	 <tr>" 
	Response.Write vbCrLf & "	  <td>"   
	
	If blnSearchResultsFound = False Then 
	
		Response.Write vbCrLf & "	  <br>"
		Response.Write vbCrLf & "	   Sua Pesquisa - <b>" & strSearchWords & "</b> - não existe nenhuma ocorrência em nossos arquivos."
	   	Response.Write vbCrLf & "	   <br><br>"
	   	Response.Write vbCrLf & "	   Sugestão:"
	   	Response.Write vbCrLf & "	   <br>"
	   	Response.Write vbCrLf & "	   <ul><li>Faça uma outra pesquisa com as palavras corretas.<li>Tente diferentes palavras.<li>Tente palavras mais comuns.<li>Tente outras palavras</ul>"
	
	Else
		
		For intDisplayResultsLoopCounter = (intFileNum + 1) to intNumFilesShown
		
			Response.Write vbCrLf & "	     <br>"
			Response.Write vbCrLf & "	    " & sarySearchResults(intDisplayResultsLoopCounter,1)
			Response.Write vbCrLf & "	     <br>"
		Next
	End If
	
	Response.Write vbCrLf & "	    </td>"
	Response.Write vbCrLf & "	  </tr>"
	Response.Write vbCrLf & "	</table>"

End If

 
If intTotalFilesFound > intRecordsPerPage then

	Response.Write vbCrLf & "	<br>"
	Response.Write vbCrLf & "	<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">"
	Response.Write vbCrLf & " 	  <tr>"
	Response.Write vbCrLf & " 	    <td>"
	Response.Write vbCrLf & "		<table width=""100%"" border=""0"" cellpadding=""0"" cellspacing=""0"">"
	Response.Write vbCrLf & "		  <tr>"
	Response.Write vbCrLf & "		    <td width=""50%"" align=""center"">"
	
	Response.Write vbCrLf & "		Results Page:  "
	
		
	If intNumFilesShown > intRecordsPerPage Then 
		Response.Write vbCrLf & "		 <a href=""site_search.asp?FileNumPosition=" &  intFileNum - intRecordsPerPage  & "&search=" & Replace(strSearchWords, " ", "+") & "&mode=" & Request.QueryString("mode") & """ target=""_self""><< Prev</a> "   	     	
	End If     	
	
	
	If intTotalFilesFound > intRecordsPerPage Then 
		
		For intPageLinkLoopCounter = 1 to CInt((intTotalFilesFound / intRecordsPerPage) + 0.5)
			
			If intFileNum = (intPageLinkLoopCounter * intRecordsPerPage) - intRecordsPerPage Then
				Response.Write vbCrLf & "		     " & intPageLinkLoopCounter
			Else
			
				Response.Write vbCrLf & "		      <a href=""site_search.asp?FileNumPosition=" &  (intPageLinkLoopCounter * intRecordsPerPage) - intRecordsPerPage & "&search=" & Replace(strSearchWords, " ", "+") & "&mode=" & Request.QueryString("mode") & """ target=""_self"">" & intPageLinkLoopCounter & "</a>  "			
			End If
		Next
	End If
	
	
	If intTotalFilesFound > intNumFilesShown then   	
		Response.Write vbCrLf & "		 <a href=""site_search.asp?FileNumPosition=" &  intNumFilesShown  & "&search=" & Replace(strSearchWords, " ", "+") & "&mode=" & Request.QueryString("mode") & """ target=""_self"">Next >></a>"	   	
	End If      	
	
	
	Response.Write vbCrLf & "		    </td>"      	
	Response.Write vbCrLf & "		  </tr>"
	Response.Write vbCrLf & "		</table>"		
	Response.Write vbCrLf & "	    </td>"
	Response.Write vbCrLf & "	  </tr>"
	Response.Write vbCrLf & "	</table>"
	
 
End If 

%>
 <br>
 <div align="center">  
  <table width="98%" border="0" cellspacing="1" cellpadding="1" bgcolor="#CCCCCC" align="center">
    <tr> 
        
      <td width="47%" height="18"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> Total 
        de documentos encontrados:</font> 
        <% = intTotalFilesSearched  %>
      </td>
        <td width="53%" align="right" height="18"><%				  
Response.Write("		Powered By - <a href=""xanburzum"" target=""_blank"">www.mxstudio.com.br</a>")
%>
       </td>
      </tr>
    </table>
    <script langauge="JavaScript">document.searchIcon.src = search_icon_off.src</script>
    <br>
</div>
<br>
</body>
</html>
<%



Public Sub SearchFile(fldObject)

	Dim objRegExp				
	Dim objMatches				
	Dim filObject				
	Dim tsObject				
	Dim subFldObject			
	Dim strFileContents			
	Dim strPageTitle			
	Dim strPageDescription		
	Dim strPageKeywords			
	Dim intSearchLoopCounter		
	Dim intNumMatches			
	Dim blnSearchFound			
	
	On Error Resume Next
	
	Err.Number = 0
		  		
	Set objRegExp = New RegExp
		  		
	If Err.Number <> 0 Then 
		Response.Write("<br>Erro: O Servidor não suporta Regular Expessions object<br>Porfavor faça o download da versão alternativa em http://www.xxx.info/asp/sample_scripts/site_search_script.asp")
					
		Err.Number = 0
	End If
		
	For Each filObject in fldObject.Files
		
				
		If InStr(1, strFilesTypesToSearch, fsoObject.GetExtensionName(filObject.Name), vbTextCompare) > 0 Then
	 
			If NOT InStr(1, strBarredFiles, filObject.Name, vbTextCompare) > 0 Then		  	
		  	
			 	blnSearchFound = False
		  		
		  		intNumMatches = 0		  	
		  		
		  		objRegExp.Global = True
		  		
		  		objRegExp.IgnoreCase = True
		  		
		  				  		
		  	
			    	Set tsObject = filObject.OpenAsTextStream
			
			   	strFileContents = tsObject.ReadAll		
		
				strPageTitle = GetFileMetaTag("<title>", "</title>", strFileContents)
						
				strPageDescription = GetFileMetaTag("<meta name=""description"" content=""", """>", strFileContents)
			 	
			 	strPageKeywords = GetFileMetaTag("<meta name=""keywords"" content=""", """>", strFileContents)
			 			 	
			 	
			 	
			 	objRegExp.Pattern = "<[^>]*>"
			 	
			 	strFileContents = objRegExp.Replace(strFileContents,"")
			 		
			 	strFileContents = strFileContents & " " & strPageTitle & " " & strPageDescription & " " & strPageKeywords
			 	
			 
			 				 	
			 	If Request.QueryString("mode") = "phrase" Then
			 		
			 		
			 		objRegExp.Pattern = "\b" & strSearchWords & "\b"
			 		
			 		Set objMatches = objRegExp.Execute(strFileContents)
			 		
			 		If objMatches.Count > 0 Then
			 		
			 			intNumMatches = objMatches.Count
			 		
			 			blnSearchFound = True
			 		End If
			 	
			 	
			 	Else
			 			 	
			 	If Request.QueryString("mode") = "allwords" then blnSearchFound = True
				 	
				 	
				 	For intSearchLoopCounter = 0 to UBound(sarySearchWord)
				 	
				 		objRegExp.Pattern = "\b" & sarySearchWord(intSearchLoopCounter) & "\b"
				 		
				 		Set objMatches = objRegExp.Execute(strFileContents)
				 		    	
					    	If objMatches.Count > 0 Then 
					    	
			 				intNumMatches = intNumMatches + objMatches.Count
				    	
				    			If Request.QueryString("mode") = "anywords" then blnSearchFound = True
				    			
				    		Else
				    			If Request.QueryString("mode") = "allwords" then blnSearchFound = False
				    			
				    		End If
				    	Next
			    	End If
			    				    	
			    	
			    	intTotalFilesSearched = intTotalFilesSearched + 1
			
			
			    	
			    	If strPageTitle = "" Then strPageTitle = "Sem Titulo"
			    	
			    	If strPageDescription = "" Then strPageDescription = "Descrição do arquivo (pagina)"
			    	
			    		    				    			    	
			    	
			    	If blnSearchFound = True Then
			    			    	
			    					    		    	
					intTotalFilesFound = intTotalFilesFound + 1
										
			    			    		
					If  intNumFilesShown < (intRecordsPerPage + intFileNum) and intTotalFilesFound > intNumFilesShown Then
	
						intNumFilesShown = intNumFilesShown + 1
						
					End If	
		
					       		
				       		
			       		intResultsArrayPosition = intResultsArrayPosition + 1
			       		
				       		
			       		blnSearchResultsFound = True
				       					       		
					If blnIsRoot = True Then
						
						
						sarySearchResults(intResultsArrayPosition,1) = "<a href=""./" &  filObject.Name & """ target=""_self"">" & strPageTitle & "</a>" 
													
								    						       		
			       		Else
			       			sarySearchResults(intResultsArrayPosition,1) = "<a href=""./" & strFileURL  & fldObject.Name & "/" & filObject.Name & """ target=""_self"">" & strPageTitle & "</a>"			   			   								
						
					End If						
					
					sarySearchResults(intResultsArrayPosition,1) = sarySearchResults(intResultsArrayPosition,1) & vbCrLf & "        <br>" & strPageDescription
					sarySearchResults(intResultsArrayPosition,1) = sarySearchResults(intResultsArrayPosition,1) & vbCrLf & "        <font size=""2"" color=""#0000FF""><br><i>Search Matches " & intNumMatches & "  -  Last Updated " & FormatDateTime(filObject.DateLastModified, VbLongDate) & "  -  Size " & CInt(filObject.Size / 1024) & "kb</i></font>"
					
					
					
					sarySearchResults(intResultsArrayPosition,2) = intNumMatches
									
		      		End If
							
		    		tsObject.Close
			End If
		End If
	Next
	
	Set objRegExp = Nothing
		
	
	For Each subFldObject In FldObject.SubFolders
										
		If NOT InStr(1, strBarredFolders, subFldObject.Name, vbTextCompare) > 0 Then
			
			blnIsRoot = False
						
					
			strFileURL = fldObject.Path & "\"
			
			strFileURL = Replace(strFileURL, strServerPath, "")
			
			strFileURL = Replace(strFileURL, "\", "/")
			
			strFileURL = Server.URLEncode(strFileURL)
			
			strFileURL = Replace(strFileURL, "%2F", "/")
						
			Call SearchFile(subFldObject)
		End If
	Next



	Set filObject = Nothing
	Set tsObject = Nothing
	Set subFldObject = Nothing
End Sub




Private Sub SortResultsByNumMatches(ByRef sarySearchResults, ByRef intTotalFilesFound)

	Dim intArrayGap 	
	Dim intIndexPosition	
	Dim intTempResultsHold		
	Dim intTempNumMatchesHold	
	Dim intPassNumber		
	For intPassNumber = 1 To intTotalFilesFound
	
		For intIndexPosition = 1 To (intTotalFilesFound - intPassNumber)
		
			If sarySearchResults(intIndexPosition,2) < sarySearchResults((intIndexPosition+1),2) Then
			
				
				intTempResultsHold = sarySearchResults(intIndexPosition,1)
				
				intTempNumMatchesHold = sarySearchResults(intIndexPosition,2)
				
				
				sarySearchResults(intIndexPosition,1) = sarySearchResults((intIndexPosition+1),1)
									
				sarySearchResults(intIndexPosition,2) = sarySearchResults((intIndexPosition+1),2)
				
				sarySearchResults((intIndexPosition+1),1) = intTempResultsHold
				
				sarySearchResults((intIndexPosition+1),2) = intTempNumMatchesHold			
			End If
		Next			
	Next					
End Sub




Private Function GetFileMetaTag(ByRef strStartValue, ByRef strEndValue, ByVal strFileContents)

	Dim intStartPositionInFile	
	Dim intEndPositionInFile	
	intStartPositionInFile = InStr(1, LCase(strFileContents), strStartValue, 1)
	
	
	If intStartPositionInFile = 0 And InStr(strStartValue, "name=") Then
		
		strStartValue = Replace(strStartValue, "name=", "http-equiv=")
		
		intStartPositionInFile = InStr(1, LCase(strFileContents), strStartValue, 1)		
	End If
	
				    	
	If NOT intStartPositionInFile = 0 Then
					
		intStartPositionInFile = intStartPositionInFile + Len(strStartValue)
						
		intEndPositionInFile = InStr(intStartPositionInFile, LCase(strFileContents), strEndValue, 1)
	
		GetFileMetaTag = Trim(Mid(strFileContents, intStartPositionInFile, (intEndPositionInFile - intStartPositionInFile)))
					
	Else
		GetFileMetaTag = ""
		       		
	End If

End Function
%>
  

Compartilhar este post


Link para o post
Compartilhar em outros sites

Rafael, vc está inserindo a Div Scroll em lugar errado e por isso não ve o resultado.

 

Vejo o exemplo simples de como funciona.

<style type="text/css">
#scroll {
  width:150px;
  height:90px;
  background-color:#F2F2F2;
  overflow:auto;
}

#espaco {
padding:5px;
}
</style>

<div id="scroll">

fdfdfds
<br />
fdfdfds
<br />
fdfdfds
<br />
fdfdfds
<br />
fdfdfds
<br />
fdfdfds
<br />
fdfdfds
<br />
fdfdfds
<br />
fdfdfds
<br />
fdfdfds
<br />
fdfdfds
<br />
fdfdfds
<br />
fdfdfds
<br />
fdfdfds

</div>

Faça o teste para ver como é.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Rafael, para vc trabalhar com as Rolagem Vertical e Horizontal, precisa alterar as medidas do CSS,

 

Tente alterar

 

width:340px;
height:170px;

 

E veja se consegue o esperado que deseja, lembrando tb que, caso vc não deseje inserir medida em px; pode deixar como "auto;"

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.