Editing TS This edit will create a new revision. Your details (optional) Name Email (won’t be displayed; might be used for Gravatar) URL Test case details Title * Published (uncheck if you want to fiddle around before making the page public) Description (in case you feel further explanation is needed)(Markdown syntax is allowed) Are you a spammer? (just answer the question) Preparation code Preparation code HTML (this will be inserted in the <body> of a valid HTML5 document in standards mode) (useful when testing DOM operations or including libraries) <script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"> </script> <!--/*MIDDLE*/--> <div id="middle"> <div id="middle-container"> <!--#Include file="include_menu_eshop.asp"--> <div id="eshop-container"> <% If NOT rsElenco.recordcount=0 then 'CONTROLLO SUPERFLUO CONTA_ARTICOLI = 1 CONTA_RISULTATI = 1 'PRIMO CICLO DI COSTRUZIONE DELLA VARIABILE PER LA VISUALIZZAZIONE DEL CAPTION IMAGE Do while not rsElenco.eof STRINGA_CAPTION=S TRINGA_CAPTION & "'CAPTION_"&rsElenco( "ID_ARTICOLO")& "'," 'PROSEGUO IL CICLO DI COSTRUZIONE DELLA VARIABILE rsElenco.Movenext Loop rsElenco.Movefirst %> <script type="text/javascript" src="<%=URL%>/js/jquery.caption.js"></script> <%'<!--/*caption images*/--> %> <script type="text/javascript"> <!-- $(document).ready(function() { var caption = [ < %= LEFT(STRINGA_CAPTION, LEN(STRINGA_CAPTION) - 1) % > ]; $.each(caption, function(i, val) { $('#' + val + '').contenthover({ data_selector: '.eshop-article-list-caption', overlay_height: 55, effect: 'slide', slide_speed: 300, overlay_background: '<%If NOT cInt(LOGIN_STAGIONE_ESHOP) = 10 then response.Write("#f6f6f6") else response.Write("#fff")%>', overlay_opacity: 0.8 }); }); }); // --> </script> <% Do while not rsElenco.eof 'INIZIO IL CICLO DEGLI ARTICOLI '----------------------------------------------------------------------------------- 'APERTURA STORED PROCEDURE sp_ESHOP_Article_Sheet E RECUPERO IL PREZZO DELL'ARTICOLO '----------------------------------------------------------------------------------- Set cmd_sp_ESHOP_Article_Sheet = Server.CreateObject("ADODB.Command") set rsPrezzo = server.createobject("ADODB.recordset") rsPrezzo.CursorLocation = 3 With cmd_sp_ESHOP_Article_Sheet .ActiveConnection = cnConn .CommandText = "sp_ESHOP_Article_Sheet" .CommandType = 4 .Parameters.Append .CreateParameter("@id_stato", 3, 1, , FixSQL(cInt(LOGIN_STATO))) .Parameters.Append .CreateParameter("@id_lingua", 3, 1, , FixSQL(cInt(LOGIN_LINGUA))) .Parameters.Append .CreateParameter("@id_articolo", 3, 1, , FixSQL(cDbl(rsElenco("ID_ARTICOLO")))) .Parameters.Append .CreateParameter("@id_categoria", 3, 1, , FixSQL(cInt(ID_CATEGORIA))) .Parameters.Append .CreateParameter("@id_taglia", 3, 1, , 0) .Parameters.Append .CreateParameter("@id_colore", 3, 1, , 0) .Parameters.Append .CreateParameter("@id_utente", 3, 1, , FixSQL(cDbl(LOGIN_UTENTE_ID))) .Parameters.Append .CreateParameter("@visualizza_articolo", 3, 1, , 0) End With rsPrezzo.Open cmd_sp_ESHOP_Article_Sheet 'SE SIAMO A GIA ' 5 ARTICOLI VISUALIZZATI ELIMINO LO SPAZIO IN FONDO (CHE C'E ' GIA' DA DIV CONTENITORE) E TOLGO IL MARGINE DESTRO DI 10 PIXEL ALLA FOTO If cInt(CONTA_RISULTATI)=5 then SPACE_RIGHT="style=" "margin:0px" "" %> <div id="eshop-article-list" <%=SPACE_RIGHT%> > <a href="<%=URL&" / "&rsPrezzo("URL_REWRITE ")%>" style="text-decoration:none"> <img src="<%=URL%>/cgi-bin/article/<%=rsElenco("IMG_COVER")%>" id="CAPTION_<%=rsElenco("ID_ARTICOLO")%>" width="180" height="270" border="0" title="<%=rsElenco("DESCRIZIONE")%>"/> <div class="eshop-article-list-caption"> <strong><%=Label(4,LOGIN_LINGUA)%>. <span style="color:#6b6b6b"><%=rsElenco("CODICE_ARTICOLO")%></span></strong><br /> <% If isNull(rsPrezzo("SCONTO_TIPOLOGIA")) then response.Write("<strong>"&formatCurrency(cCur(rsPrezzo("PREZZO_VENDITA")),2)&"</strong>") else response.Write("<span style=""color:#6b6b6b; text-decoration:line-through"">"&formatCurrency(cCur(rsPrezzo("PREZZO_VENDITA")),2)&"</span> <strong>"&formatCurrency(cCur(rsPrezzo("PREZZO_PAGATO")),2)&"</strong>") If cInt(rsElenco("PRENOTABILE")) = 1 then response.Write("<br /><span class=""eshop-article-booking"">"&Label(38,LOGIN_LINGUA)&"</span>") %> </div> </a> <div class="clear" style="margin-bottom:10px"> </div> <a href="<%=URL&" / "&rsElenco("URL_REWRITE ")%>"><%=rsElenco("DESCRIZIONE")%></a> </div> <% 'RIGA A CAPO + VISUALIZZAZIONE RIGA DI SEPARAZIONE If cInt(rsElenco.recordcount) > 5 then If cInt(CONTA_RISULTATI) = 5 AND NOT cInt(rsElenco.recordcount) = cInt(CONTA_ARTICOLI) then response.Write("<div class=""clear""></div><div class=""eshop-article-line""></div>") & chr(13) & chr(10) CONTA_RISULTATI = 0 end if end if 'AGGIORNO LE VARIABILI PER IL CICLO SUCCESSIVO SPACE_RIGHT="" CONTA_RISULTATI=c Int(CONTA_RISULTATI) + 1 CONTA_ARTICOLI=c Int(CONTA_ARTICOLI) + 1 'CHIUDO IL CONTROLLO SU RSPREZZO RECORDCOUNT rsPrezzo.Close Set rsPrezzo = nothing Set cmd_sp_ESHOP_Article_Sheet = nothing 'PROSEGUO IL CICLO DEGLI ARTICOLI rsElenco.Movenext loop rsElenco.Movefirst end if 'CHIUDO IL CONTROLLO SU RSELENCO RECORDCOUNT rsElenco.Close Set rsElenco = nothing Set cmd_sp_ESHOP_Search_Article = nothing %> </div> </div> Include JavaScript libraries as follows: <script src="//cdn.ext/library.js"></script> Define setup for all tests (variables, functions, arrays or other objects that will be used in the tests) (runs before each clocked test loop, outside of the timed code region) (e.g. define local test variables, reset global variables, clear canvas, etc.) (see FAQ) Define teardown for all tests (runs after each clocked test loop, outside of the timed code region) (see FAQ) Code snippets to compare Test 1 Title Async (check if this is an asynchronous test) Code <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!--#Include file="function.asp"--> <!--#Include file="function_session.asp"--> <% Session.Timeout = 60 'LASCIO APERTO LA SESSIONE PER 60 MINUTI response.Buffer = true ACCESO_ESHOP = 1 'VARIABILE PER L'ACCENSIONE DELLA VOCE DI MENU E-SHOP 'CONTROLLO SULLA CATEGORIA --> SE URL REWRITE DA ZERO (QUINDI SBAGLIATO O SENZA ARTICOLI) OPPURE PROVENGO DA UNA NAZIONE SENZA SHOP ONLINE FACCIO SUBITO IL REDIRECT ALL'HOMEPAGE If NOT LOGIN_STAGIONE_ESHOP_ID_CATEGORIA_MACRO_CATEGORIA = "" then ID_CATEGORIA = LOGIN_STAGIONE_ESHOP_ID_CATEGORIA_MACRO_CATEGORIA else if isNull(LOGIN_STAGIONE_ESHOP_CATEGORIA) then ID_CATEGORIA = 0 else ID_CATEGORIA = LOGIN_STAGIONE_ESHOP_CATEGORIA end if end if 'CONTROLLO SULLA CATEGORIA --> SE URL REWRITE DA ZERO (QUINDI SBAGLIATO O SENZA ARTICOLI) OPPURE PROVENGO DA UNA NAZIONE SENZA SHOP ONLINE FACCIO SUBITO IL REDIRECT ALL'HOMEPAGE If cInt(LOGIN_ESHOP)= 0 then response.Redirect(URL&"/index.asp") '------------------------------------------------------------------------------------ 'APERTURA STORED PROCEDURE sp_ESHOP_Search_Article E RECUPERO L'ELENCO DEGLI ARTICOLI '------------------------------------------------------------------------------------ Set cmd_sp_ESHOP_Search_Article = Server.CreateObject("ADODB.Command") set rsElenco = server.createobject("ADODB.recordset") rsElenco.CursorLocation = 3 With cmd_sp_ESHOP_Search_Article .ActiveConnection = cnConn .CommandText = "sp_ESHOP_Search_Article" .CommandType = 4 .Parameters.Append .CreateParameter("@id_stato", 3, 1, , FixSQL(cInt(LOGIN_STATO))) .Parameters.Append .CreateParameter("@id_lingua", 3, 1, , FixSQL(cInt(LOGIN_LINGUA))) .Parameters.Append .CreateParameter("@id_stagione", 3, 1, , FixSQL(cInt(LOGIN_STAGIONE_ESHOP))) .Parameters.Append .CreateParameter("@tipologia_stagione", 200, 1, 1, ""&FixSQL(LOGIN_STAGIONE_ESHOP_TIPOLOGIA)&"") .Parameters.Append .CreateParameter("@tipologia_linea", 200, 1, 1, ""&FixSQL(LOGIN_STAGIONE_ESHOP_LINEA)&"") .Parameters.Append .CreateParameter("@id_categoria", 3, 1, , FixSQL(ID_CATEGORIA)) .Parameters.Append .CreateParameter("@codice_articolo", 200, 1, 50, ""&LOGIN_STAGIONE_ESHOP_CODICE&"") .Parameters.Append .CreateParameter("@id_macro_categoria", 3, 1, , LOGIN_STAGIONE_ESHOP_MACRO_CATEGORIA) .Parameters.Append .CreateParameter("@id_taglia", 3, 1, , LOGIN_STAGIONE_ESHOP_TAGLIA) .Parameters.Append .CreateParameter("@id_macro_colore", 3, 1, , LOGIN_STAGIONE_ESHOP_MACRO_COLORE) End With rsElenco.Open cmd_sp_ESHOP_Search_Article A 'SE E' STATA FATTA UNA RICERCA PER CODICE E DA SOLO UN RISULTATO --> REDIRECT DIRETTO ALLA SCHEDA ARTICOLO 'If NOT LOGIN_STAGIONE_ESHOP_CODICE = "" AND cInt(rsElenco.recordcount) = 1 then response.Redirect(URL&"/"&rsElenco("URL_REWRITE")) %> <!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" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <title>TWIN-SET Simona Barbieri <%If NOT cInt(rsElenco.recordcount) = 0 AND NOT isNull(rsElenco("CATEGORIA")) then response.Write(":: "&rsElenco("CATEGORIA"))%></title> <meta name="description" content=<%=Label(2,LOGIN_LINGUA)%>" /> <meta name="keywords" content="<%=Label(1,LOGIN_LINGUA)%> <%If NOT cInt(rsElenco.recordcount) = 0 AND NOT isNull(rsElenco("CATEGORIA")) then response.Write(rsElenco("CATEGORIA")&" ,")%>" /> <meta name="author" content="Twin Set - Simona Barbieri S.r.l."> <meta name="copyright" content="Twin Set - Simona Barbieri S.r.l."> <meta http-equiv="content-type" content="text/html" charset="utf-8"> <meta http-equiv="Cache-Control" content="no-cache" /> <meta http-equiv="Pragma" content="no-cache" /> <meta http-equiv="Expires" content="0" /> <link rel="shortcut icon" href="http://www.twin-set.it/favicon.ico" /> <link rel="stylesheet" type="text/css" href="<%=URL%>/css/style.css"> <!--#Include file="include_header.asp"--> <!--/*MIDDLE*/--> <div id="middle"> <div id="middle-container"> <!--#Include file="include_menu_eshop.asp"--> <div id="eshop-container"> <% If NOT rsElenco.recordcount = 0 then 'CONTROLLO SUPERFLUO CONTA_ARTICOLI = 1 CONTA_RISULTATI = 1 'PRIMO CICLO DI COSTRUZIONE DELLA VARIABILE PER LA VISUALIZZAZIONE DEL CAPTION IMAGE Do while not rsElenco.eof STRINGA_CAPTION = STRINGA_CAPTION & "'CAPTION_"&rsElenco("ID_ARTICOLO")&"'," 'PROSEGUO IL CICLO DI COSTRUZIONE DELLA VARIABILE rsElenco.Movenext Loop rsElenco.Movefirst %> <script type="text/javascript" src="<%=URL%>/js/jquery.caption.js"></script> <%'<!--/*caption images*/-->%> <script type="text/javascript"> <!-- $(document).ready(function() { var caption = [<%=LEFT(STRINGA_CAPTION, LEN(STRINGA_CAPTION)-1)%>]; $.each(caption, function(i,val) { $('#'+val+'').contenthover({ data_selector: '.eshop-article-list-caption', overlay_height:55, effect:'slide', slide_speed:300, overlay_background:'<%If NOT cInt(LOGIN_STAGIONE_ESHOP) = 10 then response.Write("#f6f6f6") else response.Write("#fff")%>', overlay_opacity:0.8 }); }); }); // --> </script> <% Do while not rsElenco.eof 'INIZIO IL CICLO DEGLI ARTICOLI '----------------------------------------------------------------------------------- 'APERTURA STORED PROCEDURE sp_ESHOP_Article_Sheet E RECUPERO IL PREZZO DELL'ARTICOLO '----------------------------------------------------------------------------------- Set cmd_sp_ESHOP_Article_Sheet = Server.CreateObject("ADODB.Command") set rsPrezzo = server.createobject("ADODB.recordset") rsPrezzo.CursorLocation = 3 With cmd_sp_ESHOP_Article_Sheet .ActiveConnection = cnConn .CommandText = "sp_ESHOP_Article_Sheet" .CommandType = 4 .Parameters.Append .CreateParameter("@id_stato", 3, 1, , FixSQL(cInt(LOGIN_STATO))) .Parameters.Append .CreateParameter("@id_lingua", 3, 1, , FixSQL(cInt(LOGIN_LINGUA))) .Parameters.Append .CreateParameter("@id_articolo", 3, 1, , FixSQL(cDbl(rsElenco("ID_ARTICOLO")))) .Parameters.Append .CreateParameter("@id_categoria", 3, 1, , FixSQL(cInt(ID_CATEGORIA))) .Parameters.Append .CreateParameter("@id_taglia", 3, 1, , 0) .Parameters.Append .CreateParameter("@id_colore", 3, 1, , 0) .Parameters.Append .CreateParameter("@id_utente", 3, 1, , FixSQL(cDbl(LOGIN_UTENTE_ID))) .Parameters.Append .CreateParameter("@visualizza_articolo", 3, 1, , 0) End With rsPrezzo.Open cmd_sp_ESHOP_Article_Sheet 'SE SIAMO A GIA' 5 ARTICOLI VISUALIZZATI ELIMINO LO SPAZIO IN FONDO (CHE C'E' GIA' DA DIV CONTENITORE) E TOLGO IL MARGINE DESTRO DI 10 PIXEL ALLA FOTO If cInt(CONTA_RISULTATI) = 5 then SPACE_RIGHT = "style=""margin:0px""" %> <div id="eshop-article-list" <%=SPACE_RIGHT%>> <a href="<%=URL&"/"&rsPrezzo("URL_REWRITE")%>" style="text-decoration:none"> <img src="<%=URL%>/cgi-bin/article/<%=rsElenco("IMG_COVER")%>" id="CAPTION_<%=rsElenco("ID_ARTICOLO")%>" width="180" height="270" border="0" title="<%=rsElenco("DESCRIZIONE")%>"/> <div class="eshop-article-list-caption"> <strong><%=Label(4,LOGIN_LINGUA)%>. <span style="color:#6b6b6b"><%=rsElenco("CODICE_ARTICOLO")%></span></strong><br /> <% If isNull(rsPrezzo("SCONTO_TIPOLOGIA")) then response.Write("<strong>"&formatCurrency(cCur(rsPrezzo("PREZZO_VENDITA")),2)&"</strong>") else response.Write("<span style=""color:#6b6b6b; text-decoration:line-through"">"&formatCurrency(cCur(rsPrezzo("PREZZO_VENDITA")),2)&"</span> <strong>"&formatCurrency(cCur(rsPrezzo("PREZZO_PAGATO")),2)&"</strong>") If cInt(rsElenco("PRENOTABILE")) = 1 then response.Write("<br /><span class=""eshop-article-booking"">"&Label(38,LOGIN_LINGUA)&"</span>") %> </div> </a> <div class="clear" style="margin-bottom:10px"></div> <a href="<%=URL&"/"&rsElenco("URL_REWRITE")%>"><%=rsElenco("DESCRIZIONE")%></a> </div> <% 'RIGA A CAPO + VISUALIZZAZIONE RIGA DI SEPARAZIONE If cInt(rsElenco.recordcount) > 5 then If cInt(CONTA_RISULTATI) = 5 AND NOT cInt(rsElenco.recordcount) = cInt(CONTA_ARTICOLI) then response.Write("<div class=""clear""></div><div class=""eshop-article-line""></div>") & chr(13) & chr(10) CONTA_RISULTATI = 0 end if end if 'AGGIORNO LE VARIABILI PER IL CICLO SUCCESSIVO SPACE_RIGHT = "" CONTA_RISULTATI = cInt(CONTA_RISULTATI) + 1 CONTA_ARTICOLI = cInt(CONTA_ARTICOLI) + 1 'CHIUDO IL CONTROLLO SU RSPREZZO RECORDCOUNT rsPrezzo.Close Set rsPrezzo = nothing Set cmd_sp_ESHOP_Article_Sheet = nothing 'PROSEGUO IL CICLO DEGLI ARTICOLI rsElenco.Movenext loop rsElenco.Movefirst end if 'CHIUDO IL CONTROLLO SU RSELENCO RECORDCOUNT rsElenco.Close Set rsElenco = nothing Set cmd_sp_ESHOP_Search_Article = nothing %> </div> </div> <!--#Include file="include_footer.asp"-->