Ir para conteúdo

Arquivado

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

supino

No Opera não funciona

Recommended Posts

Ae galera, problemas estou fazendo uma pesquisa usando ajax ai faço carregar o nome de umas garotas em um select, o problema é que no opera8 não funciona no IE e FF estão uma beleza.

 

Se alguem puder ajudar agradeço!!!!!!!!!!!!!

 

parte do ajax

 

function openAjax() {var ajax;try{	ajax = new XMLHttpRequest(); // XMLHttpRequest para browsers decentes, como: Firefox, Safari, dentre outros.}catch(ee){	try{		ajax = new ActiveXObject("Msxml2.XMLHTTP"); // Para o IE da MS	}catch(e){		try{			ajax = new ActiveXObject("Microsoft.XMLHTTP"); // Para o IE da MS		}catch(E){			ajax = false;		}	}}return ajax;}// Função que realiza a busca avançadafunction BuscaGarota(widade,waltura,wpeso,wcidade,wtelefone,wmanequim,wbusto,wcintura,wquadril,wcor,wolhos,wcabelos) {	if(document.getElementById) { // Para os browsers complacentes com o DOM W3C.		var exibeResultado = document.getElementById('resposta'); // div que exibirá o resultado da busca.		var ajax = openAjax(); // Inicia o Ajax.			ajax.open("GET", "efetua_busca_avancada.asp?idade=" +widade+ "&altura=" + waltura + "&peso=" + wpeso + "&cidade=" + wcidade + "&telefone=" + wtelefone + "&manequim=" + wmanequim + "&busto=" + wbusto + "&cintura=" + wcintura + "&quadril=" + wquadril + "&cor=" + wcor + "&olhos=" + wolhos + "&cabelos=" + wcabelos, true); // Envia o termo da busca como uma querystring, nos possibilitando o filtro na busca.			ajax.onreadystatechange = function() {				if(ajax.readyState == 1) { // Quando estiver carregando, exibe: carregando...					exibeResultado.innerHTML = "<img src='imgs/progressbar.gif'>";				}				if(ajax.readyState == 4) { // Quando estiver tudo pronto.					if(ajax.status == 200) {						var resultado = ajax.responseText; // Coloca o resultado (da busca) retornado pelo Ajax nessa variável (var resultado).						resultado = resultado.replace(/\+/g," "); // Resolve o problema dos acentos (saiba mais aqui: http://www.plugsites.net/leandro/?p=4)						resultado = unescape(resultado); // Resolve o problema dos acentos						exibeResultado.innerHTML = resultado;					} else {						exibeResultado.innerHTML = "Erro: ";					}				}			}			ajax.send(null); // submete	}}

busca_avancada.asp

 

<!--#include file="includes/inc_conexao.asp"--><!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=iso-8859-1" /><title>Musas do Pecado</title><script language="javascript" src="javascript/script.js" type="text/javascript"></script><script language="javascript" src="ajax/funcoes.js" type="text/javascript"></script><link href="includes/css.css" rel="stylesheet" type="text/css" /></head><body><div id="corpo">	  <div id="colunaleft"> 	<!--#include file="menu.asp"-->  </div>		<div id="colunacenter">			<!--#include file="top.asp"-->	<div id="resposta">		<div><img src="imgs/img_busca.jpg" alt="Busca" width="535" height="115" /></div>	<div class="busca_det">	<img src="imgs/tit_selecione.gif" alt="Selecione as opções desejadas" />		<table>	<form method="get" name="busca_nome" action="efetua_busca_avancada.asp" class="busca_det">	<tr><td >Garota:</td><td><select name="nome" id="nome" />						  <%						  sql= "select nome from garotas g,foto_garotas f,tipo_fotos t where t.tip_id=f.tip_id and f.gar_id=g.gar_id and t.tip_id=2"						  Set rs = QueryRS(sql)%>						  <option value="todas">Todas</option>						  <%while not rs.eof%>						  <option value="<%=Server.HTMLEncode(rs("nome"))%>"><%=Server.HTMLEncode(rs("nome"))%></option>						  <%						  rs.MoveNext						  wend%>						  </select>						  <input type="hidden" name="tipo" value="com nome" />						  <input type="button" value="Busca" onClick="java script: CarregaPagina('efetua_busca_avancada.asp?nome='+nome.value+'&tipo='+tipo.value,'resposta');" />	</form>	</td></tr>

efetua_busca_avancada.asp

 

<!--#include file="includes/inc_conexao.asp"--><%nome = request("nome")idade = request("idade")altura = request("altura")peso = request("peso")cidade = request("cidade")telefone = request("telefone")manequim = request("manequim")busto = request("busto")cor = request("cor")olhos = request("olhos")cabelos = request("cabelos")cintura  = request("cintura")quadril = request("quadril")sql2 = "select * from garotas,foto_garotas,tipo_fotos where foto_garotas.gar_id = garotas.gar_id and tipo_fotos.tip_id=2 and foto_garotas.tip_id=tipo_fotos.tip_id"if request("tipo") = "com nome" then	if nome = "todas" then	sql2 = sql2	else	sql2 = sql2 & " and nome='" & nome & "'"	end ifelse	if idade <> "todos" then	idade2 = Split(idade,"-")	sql2 = sql2 & " and idade between " & idade2(0) & " and " & idade2(1)	end if	if altura <> "todos" then	altura2 = Split(altura,"-")	sql2 = sql2 & " and altura between " & altura2(0) & " and " & altura2(1)	end if	if peso <> "todos" then	peso2 = Split(peso,"-")	sql2 = sql2 & " and peso between " & peso2(0) & " and " & peso2(1)	end if	if cidade <> "" then	sql2 = sql2 & " and cidade='" & cidade & "'"	end if	if telefone <> "" then	sql2 = sql2 & " and telefone='" & telefone & "'"	end if	if manequim <> "todos" then	manequim2 = Split(manequim,"-")	sql2 = sql2 & " and manequim between " & manequim2(0) & " and " & manequim2(1)	end if	if busto <> "todos" then	busto2 = Split(busto,"-")	sql2 = sql2 & " and busto between " & busto2(0) & " and " & busto2(1)	end if	if cor <> "todos" then	sql2 = sql2 & " and garotas.cor=" & cor	end if	if olhos <> "todos" then	sql2 = sql2 & " and garotas.olhos=" & olhos	end if	if cabelos <> "todos" then	sql2 = sql2 & " and garotas.cabelos=" & cabelos	end if	if cintura <> "todos" then	cintura2 = Split(cintura,"-")	sql2 = sql2 & " and cintura between " & cintura2(0) & " and " & cintura2(1)	end if	if quadril <> "todos" then	quadril2 = Split(quadril,"-")	sql2 = sql2 & " and quadril between " & quadril2(0) & " and " & quadril2(1)	end ifend ifset rs2 = QueryRS(sql2)%><div><img src="imgs/img_busca.jpg" alt="Busca" width="535" height="115" /></div><div class="busca_det"><img src="imgs/tit_resultado.gif" alt="Resultado" /><table width="486" cellspacing="0" cellpadding="5" align="center">	  <tr>	<%	if rs2.eof then	response.write "Garota inexistente"	else	while not rs2.eof	if soma = 3 then%>	</tr><tr><%	soma = 0	end if%>   		  <td>			<div class="vipimg">		   	<p><a href="detalhe_garota.asp?wgar=<%=rs2("garotas.gar_id")%>"><img src="garotas/<%=rs2("foto")%>" class="imglink" border="0" height="50" width="50" /></a></p>		   	</div>			<div class="viptext"><p><a href="detalhe_garota.asp?wgar=<%=rs2("garotas.gar_id")%>"><%=Server.HTMLEncode(rs2("nome"))%></a></p><p><%=rs2("idade")%> anos</p>			</div>		 		  </td>	<%soma = soma + 1	if soma = 3 then	wtd = 3	end if	rs2.MoveNext	wend	end if%> 	</tr></table></div>

Compartilhar este post


Link para o post
Compartilhar em outros sites

Opera??? O.otem alguém que usa isso? lolnão sei te responder.

Compartilhar este post


Link para o post
Compartilhar em outros sites

Fleury o Opera é usado em larga escala em celulares e esta crescendo muito ele é quase uma cópia do firefox(a maioria dos errros que esta em um da em outro)

Compartilhar este post


Link para o post
Compartilhar em outros sites

Eu dei uma lida boa no código e até onde vai meu conhecimento tá tudo certo. Não sei o que precisa mudar para funcionar no Opera, desculpa aí =/

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.