Foros del Web » Programando para Internet » ASP Clásico »

Ayuda! - Imagenes dinamicas y ASP

Estas en el tema de Ayuda! - Imagenes dinamicas y ASP en el foro de ASP Clásico en Foros del Web. Vean tengo este problema... tome un proyecto ya iniciado en ASP y por todo lo ya avanzado ya no lo pasamos a PHP... yo de ...
  #1 (permalink)  
Antiguo 14/07/2004, 17:57
 
Fecha de Ingreso: julio-2004
Mensajes: 7
Antigüedad: 20 años, 9 meses
Puntos: 0
Ayuda! - Imagenes dinamicas y ASP

Vean tengo este problema...

tome un proyecto ya iniciado en ASP y por todo lo ya avanzado ya no lo pasamos a PHP... yo de ASP es muy poco lo que se y otro poco mas lo he estado aprendiendo en el camino...

Expongo aqui el caso esperando que tengan la amabilidad de ayudarme.

Se trata de una Shopping cart, esta compania vende chimeneas (fireplaces) y cada una de ellas puede ser comprada con un distinto acabado (finish) ya en la base de datos tengo estipulados todas las opciones y ya pueden ser seleccionadas para cada producto, como muestro en la siguiente imagen...



Algunos tienen hasta 15 opciones distintas, y cada una con un precio distinto, aparecen en el menu perfectamente bien, como se muestra en la siguiente imagen.



el asunto y aqui es donde necesito la ayuda, es que nosotros queremos que al seleccionar uno de los acabados del listado (1) de la misma forma en la que cambia el precio (2) aparezca una pequeña fotografia del finish que se haya seleccionado (3). Ver la siguiente imagen...



Es posible hacer esto en ASP ingresando un campo con la url de la imagen en la tabal de la base de datos que contiene la informacion de los distintos finishes? es mas posible hacerlo con Javascript?

Cualquier ayuda es bien recibida...

y se les agradece de antemano...

Que tengan un grandioso dia.

Si en algo ayuda la direccion es www.wilshirefireplace.com

Gracias.

Última edición por el_principiante; 14/07/2004 a las 17:59 Razón: cambio del titulo (incorrecto)
  #2 (permalink)  
Antiguo 14/07/2004, 18:14
Avatar de Gurrutello  
Fecha de Ingreso: enero-2002
Ubicación: Ontario,Toronto [Canada]
Mensajes: 2.017
Antigüedad: 23 años, 3 meses
Puntos: 6
Hola
Lamentablemente tienes que ingresar cada imagen para cada acabado.
Mira esta pagina
http://www.deco3d.com/sati/
el otro dia la encontré de ejemplo y consigue cambiar las texturas de los articulos que muestran.
De todas formas voy a investigar un poco a ver si hay alguna opcion ( No hay nada imposible )
Saludos
__________________
Un Saludo
www.tutores.org
Asp | Php | Javascript | Perl | Coldfusion | Flash | +- 2000 codigos
  #3 (permalink)  
Antiguo 14/07/2004, 21:02
 
Fecha de Ingreso: mayo-2001
Mensajes: 87
Antigüedad: 24 años
Puntos: 0
Una posible solucion .
aun que na que ver con este foro ya que esta en Javascript, pero la gracia es que soluciones tu problema

Código PHP:

<html>
<
head>
<
title>Documento sin t&iacute;tulo</title>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<
style type="text/css">
.
dropcontent{
width300px;
height140px;
border1px solid black;
background-color#FFECC6;
display:block;
}
</
style>

<
script type="text/javascript">

/*
Combo-Box Viewer script- Created by and ? Dynamicdrive.com
Visit [url]http://www.dynamicdrive.com/[/url] for this script and more
This notice MUST stay intact for legal use
*/

if (document.getElementById){
document.write('<style type="text/css">\n')
document.write('.dropcontent{display:none;}\n')
document.write('</style>\n')
}

function 
contractall(){
if (
document.getElementById){
var 
inc=0
while (document.getElementById("dropmsg"+inc)){
document.getElementById("dropmsg"+inc).style.display="none"
inc++
}
}
}

function 
expandone(){
if (
document.getElementById){
var 
selectedItem=document.dropmsgform.dropmsgoption.selectedIndex
contractall
()
document.getElementById("dropmsg"+selectedItem).style.display="block"
}
}

if (
window.addEventListener)
window.addEventListener("load"expandonefalse)
else if (
window.attachEvent)
window.attachEvent("onload"expandone)

</script>

</head>

<body>
<form name="dropmsgform">
<select name="dropmsgoption" size="1" style="width:300" onChange="expandone()">
    <option selected>What is JavaScript?</option>
    <option>Difference betwen Java and JavaScript</option>
    <option>What is DHTML?</option>
</select>
<br>

<div id="dropmsg0" class="dropcontent">
JavaScript is a scripting language originally developed by Netscape to add interactivity and power to web documents. It is purely client side, and runs completely on the client's browser and computer.
</div>

<div id="dropmsg1" class="dropcontent">
Java is completely different from JavaScript- it's more powerful, more complex, and unfortunately, a lot harder to master. It belongs in the same league as C, C++, and other more complex languages. Java programs need to be compiled before they can run, while JavaScript do not.
</div>

<div id="dropmsg2" class="dropcontent">
DHTML is the embodiment of a combination of technologies- JavaScript, CSS, and HTML. Through them a new level of interactivity is possible for the end user experience.
</div>

</form>

</body>
</html> 
  #4 (permalink)  
Antiguo 16/07/2004, 11:38
 
Fecha de Ingreso: julio-2004
Mensajes: 7
Antigüedad: 20 años, 9 meses
Puntos: 0
Cita:
Iniciado por Gurrutello
Hola
Lamentablemente tienes que ingresar cada imagen para cada acabado.
Mira esta pagina
http://www.deco3d.com/sati/
el otro dia la encontré de ejemplo y consigue cambiar las texturas de los articulos que muestran.
De todas formas voy a investigar un poco a ver si hay alguna opcion ( No hay nada imposible )
Saludos
pues es algo similar lo que busco lograr amigo... con la diferencia que pretendo que la imagen aparezca en la parte inferior del menu de seleccion... sigo intentando, de alguna forma se tiene que poder hacer!

Gracias por tu comentario.
  #5 (permalink)  
Antiguo 16/07/2004, 11:39
 
Fecha de Ingreso: julio-2004
Mensajes: 7
Antigüedad: 20 años, 9 meses
Puntos: 0
webpedaler:

Muchas gracias por tu aportacion... hoy mismo lo intentare. y traere noticias del resultado.

De nuevo muchisimas gracias.
  #6 (permalink)  
Antiguo 16/07/2004, 12:37
Avatar de Myakire
Colaborador
 
Fecha de Ingreso: enero-2002
Ubicación: Centro de la república
Mensajes: 8.849
Antigüedad: 23 años, 3 meses
Puntos: 146
Tal vez no he entendido bien el problema:
¿Quieres cambiar una imagen conform la seleccion de un combo?
si es esto, prueba lo siguiente:

<BODY>
<form name=frmCombos>
<select name="cbProductos" onchange="document.imagen.src=frmCombos.cbProducto s.value;">
<option value="uno.bmp">Uno
<option value="dos.bmp">Dos
<option value="tres.bmp">Tres
</select>
<br>
<img src="uno.bmp" name="imagen">
</body>

Si no era eso, disculpen la intromision, todo es por el afan de ayudar.
  #7 (permalink)  
Antiguo 22/07/2004, 16:32
 
Fecha de Ingreso: julio-2004
Mensajes: 7
Antigüedad: 20 años, 9 meses
Puntos: 0
Ok.. aqui estoy de vuelta yo y con el mismo problema, vean, vi los dos ejemplos que amablemente ustedes colocaron aqui, y ya los tendre en cuenta para futuras ocasiones, el problema es que yo quiero que la imagen desplegada venga de un campo de una tabla de la base de datos dependiendo del producto que sea...

traigo el codigo para ver si pueden ayudarme...

lo pongo en dos partes porque esta bastante grande... como mencionaba arriba, apenas estoy comenzando con ASP, fue mi socio quien hizo practicamente todo aqui y yo no termino de aprender aun muchas cosas de ASP.

la URL de cada imagen se encuentra en la tabla options de la base de datos, el campo se llama optfImage y necesito que cuando el cliente selecciones una opcion, la imagen guardada en ese campo para ese registro sea desplegada...

Si pudieran ayudarme se los agradeceria infinitamente...

Código HTML:
<%
Dim sSQL,rs,alldata,useEuro,cnn,rowcounter,iNumOfPages,CurPage,Count,weburl,longdesc,aOption()
if Trim(explicitid)<>"" then prodid=Trim(explicitid) else prodid=Trim(request.querystring("prod"))
WSP = ""
if Session("clientUser")<>"" then
	if (Session("clientActions") AND 8) = 8 then WSP = "pWholesalePrice AS "
end if
netnav = true
if instr(Request.ServerVariables("HTTP_USER_AGENT"), "compatible") > 0 OR instr(Request.ServerVariables("HTTP_USER_AGENT"), "Gecko") > 0 then netnav = false
function atb(size)
	if netnav then
		atb = CInt(size / 2 + 1)
	else
		atb = size
	end if
end function
Redim aOption(2,maxprodopts)
Count=0
Set rs = Server.CreateObject("ADODB.RecordSet")
Set rs2 = Server.CreateObject("ADODB.RecordSet")
Set cnn=Server.CreateObject("ADODB.Connection")
cnn.open sDSN
sSQL = "SELECT countryLCID,countryCurrency,countryTax,adminStockManage,currRate1,currSymbol1,currRate2,currSymbol2,currRate3,currSymbol3,currConvUser,currConvPw,currLastUpdate FROM admin INNER JOIN countries ON admin.adminCountry=countries.countryID WHERE adminID=1"
rs.Open sSQL,cnn,0,1
countryCurrency = rs("countryCurrency")
useEuro = (countryCurrency="EUR")
useStockManagement = rs("adminStockManage")<>0
if orlocale<>"" then
	saveLCID = orlocale
elseif rs("countryLCID")<>0 then
	saveLCID = rs("countryLCID")
else
	saveLCID=1033
end if
countryTax=cDbl(rs("countryTax"))
currRate1=cDbl(rs("currRate1"))
currSymbol1=trim(rs("currSymbol1"))
currRate2=cDbl(rs("currRate2"))
currSymbol2=trim(rs("currSymbol2"))
currRate3=cDbl(rs("currRate3"))
currSymbol3=trim(rs("currSymbol3"))
currConvUser=rs("currConvUser")
currConvPw=rs("currConvPw")
currLastUpdate=rs("currLastUpdate")
rs.Close
Call checkCurrencyRates(currConvUser,currConvPw,currLastUpdate,currRate1,currSymbol1,currRate2,currSymbol2,currRate3,currSymbol3)
Session.LCID = saveLCID
Session("frompage")=Request.ServerVariables("URL")&IIfVr(Trim(Request.ServerVariables("QUERY_STRING"))<>"","?","")&Request.ServerVariables("QUERY_STRING")
sSQL = "SELECT pId,pName,pImage,"&WSP&"pPrice,pSection,pListPrice,pSell,pInStock,pExemptions,pLargeImage,pDescription,pLongDescription FROM products WHERE pId='"&Replace(prodid,"'","''")&"'"
rs.Open sSQL,cnn,0,1,&H0001
if rs.EOF then
	response.write "Sorry, specified product does not exist"
else
tslist = ""
if IsNull(rs("pSection")) then catid = 0 else catid = rs("pSection")
thetopts = catid
topsectionids = catid
isrootsection=false
for index=0 to 10
	if thetopts=0 then
		if catid="0" then
			tslist = xxHome & " " & tslist
		else
			tslist = "<a href=""categories.asp"">"&xxHome&"</a> " & tslist
		end if
		exit for
	elseif index=10 then
		tslist = "<b>Loop</b>" & tslist
	else
		sSQL = "SELECT sectionID,topSection,sectionName,rootSection FROM sections WHERE sectionID=" & thetopts
		rs2.Open sSQL,cnn,0,1
		if NOT rs2.EOF then
			if rs2("rootSection")=1 then
				tslist = " &raquo; <a href=""products.asp?cat="& rs2("sectionID") & """>" & rs2("sectionName") & "</a>" & tslist
			else
				tslist = " &raquo; <a href=""categories.asp?cat="& rs2("sectionID") & """>" & rs2("sectionName") & "</a>" & tslist
			end if
			thetopts = rs2("topSection")
			topsectionids = topsectionids & "," & thetopts
		else
			tslist = "Top Section Deleted" & tslist
			rs2.Close
			exit for
		end if
		rs2.Close
	end if
next
saveLCID = Session.LCID
prodoptions=""
productdisplayscript(true)
updatepricescript(true) %>
      <table border="0" cellspacing="<%=maintablespacing%>" cellpadding="<%=maintablepadding%>" width="<%=maintablewidth%>" bgcolor="<%=maintablebg%>" align="center">
        <tr> 
          <td width="100%">
		    <form method="POST" name="tForm<%=Count%>" action="cart.asp" onSubmit="return formvalidator<%=Count%>(this)">
<%	if IsEmpty(showcategories) OR showcategories=true then %><b><font color="#FFFFFF" face="Times New Roman">
</font></b>
            <table width="<%=innertablewidth%>" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
              <tr> 
                <td colspan="3" align="<%=headeralign%>"><b><%=tslist%></b><b><font color="#FFFFFF" face="Times New Roman"><br>
                  <img src="images/clearpixel.gif" width="350" height="8"></font></b></td>
                <td align="right"><font face="Times New Roman"><b>
                <font color="#FFFFFF">&nbsp;<% if nobuyorcheckout<>true then %></font><a href="cart.asp"><font color="#FFFFFF"><img src="images/checkout.gif" border="0"></font></a><font color="#FFFFFF"><% end if %></font></b></td>
              </tr>
			</table>
<%	end if
	alldiscounts = ""
	if noshowdiscounts<>true then
		Session.LCID = 1033
		tdt = Date()
		sSQL = "SELECT DISTINCT cpnWorkingName FROM coupons LEFT OUTER JOIN cpnAssign ON coupons.cpnID=cpnAssign.cpaCpnID WHERE cpnNumAvail>0 AND cpnEndDate>="&datedelim&DatePart("m",tdt) & "/" & DatePart("d",tdt) & "/" & DatePart("yyyy",tdt)&datedelim&" AND cpnIsCoupon=0 AND "
		sSQL = sSQL & "((cpnSitewide=1 OR cpnSitewide=2) "
		sSQL = sSQL & "OR (cpnSitewide=0 AND cpaType=2 AND cpaAssignment='"&rs("pID")&"') "
		sSQL = sSQL & "OR (cpnSitewide=0 AND cpaType=1 AND cpaAssignment IN ('"&Replace(topsectionids,",","','")&"')))"
		Session.LCID = saveLCID
		rs2.Open sSQL,cnn,0,1
		do while NOT rs2.EOF
			alldiscounts = alldiscounts & rs2("cpnWorkingName") & "<br>"
			rs2.MoveNext
		loop
		rs2.Close
	end if
	if usedetailbodyformat=1 OR usedetailbodyformat="" then %><b><font color="#FFFFFF">
</font></b></font>
            <table width="<%=innertablewidth%>" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
              <tr> 
                <td width="100%" colspan="4"> 
                  <p><font color="#FFFFFF" face="Times New Roman"><b><% if showproductid=true then response.write "<b>" & xxPrId & ":</b> " & rs("pID") & "<br>" %><%=rs("pName")&xxDot%><% if alldiscounts<>"" then response.write " <font color=""#FF0000""><strong>"&xxDsApp&"</strong><br><font size=""1"">" & alldiscounts & "</font></font>" %></b></font></p>
                </td>
              </tr>
              <tr> 
                <td width="100%" colspan="4" align="center" valign="middle"> <% if NOT (Trim(rs("pLargeImage"))="" OR IsNull(rs("pLargeImage")) OR Trim(rs("pLargeImage"))="prodimages/") then %><b><font color="#FFFFFF" face="Times New Roman">
                </font></b><b><font color="#FFFFFF" face="Times New Roman"> 
                  <img src="<%=rs("pLargeImage")%>" border="0" alt="<%=Replace(rs("pName"),"""","&quot;")%>"> <% elseif NOT (Trim(rs("pImage"))="" OR IsNull(rs("pImage")) OR Trim(rs("pImage"))="prodimages/") then %> 
                  <img src="<%=rs("pImage")%>" border="0" alt="<%=Replace(rs("pName"),"""","&quot;")%>"> <% else %> &nbsp; <% end if %>
                </font></b> 
                </td>
              </tr>
              <tr> 
                <td width="100%" colspan="4"> 
                  <p><b><font color="#FFFFFF" face="Times New Roman"><% shortdesc = Trim(rs("pDescription"))
				longdesc = Trim(rs("pLongDescription"))
				if longdesc<>"" then
					response.write longdesc
				elseif shortdesc<>"" then
					response.write shortdesc
				else
					response.write "&nbsp;"
				end if %></font></b></p> 
  #8 (permalink)  
Antiguo 22/07/2004, 16:36
 
Fecha de Ingreso: julio-2004
Mensajes: 7
Antigüedad: 20 años, 9 meses
Puntos: 0
esta es la segunda parte... y creo que es aqui donde se consultan los datos de la tabla de options (que son los finishes para los productos)

Código HTML:
p align="center">
<b><font color="#FFFFFF" face="Times New Roman">
<%
if IsArray(prodoptions) then
	response.write "<table border='0' cellspacing='1' cellpadding='1'>"
	for rowcounter=0 to UBOUND(prodoptions,2)
		index=0
		gotSelection=false
		cacheThis=true
		do while index < (maxprodopts-1) AND aOption(0,index)<>0
			if aOption(0,index)=Int(prodoptions(0,rowcounter)) then
				gotSelection=true
				exit do
			end if
			index = index + 1
		loop
		if NOT gotSelection then
			sSQL="SELECT optID,optName,optfImage,optGrpName,optPriceDiff,optType,optFlags FROM options INNER JOIN optionGroup ON options.optGroup=optionGroup.optGrpID WHERE optGroup="&prodoptions(0,rowcounter)&" ORDER BY optID"
			rs2.Open sSQL,cnn,0,1
			if NOT rs2.EOF then
				if Abs(Int(rs2("optType")))=3 then
					fieldHeight = cInt((cDbl(rs2("optPriceDiff"))-Int(rs2("optPriceDiff")))*100.0)
					aOption(1,index) = "<tr><td align='right' width='30%'><b>"&rs2("optGrpName")&":</b></td><td> <input type='hidden' name='optnPLACEHOLDER' value='"&rs2("optID")&"'>"
					if fieldHeight<>1 then
						aOption(1,index) = aOption(1,index) & "<textarea wrap='virtual' name='voptnPLACEHOLDER' cols='"&atb(Int(rs2("optPriceDiff")))&"' rows='"&fieldHeight&"'>"
						aOption(1,index) = aOption(1,index) & rs2("optName")&"</textarea>"
					else
						aOption(1,index) = aOption(1,index) & "<input maxlength='255' type='text' name='voptnPLACEHOLDER' size='"&atb(Int(rs2("optPriceDiff")))&"' value="""&Replace(rs2("optName"),"""","&quot;")&""">"
					end if
					aOption(1,index) = aOption(1,index) & "</td></tr>"
				else
					aOption(1,index) = "<tr><td align='right' width='30%'><b>"&rs2("optGrpName")&":</b></td><td> <select class=""prodoption"" onChange='updatepricePLACEHOLDER();' name='optnPLACEHOLDER' size='1'>"
					if Int(rs2("optType"))>0 then aOption(1,index) = aOption(1,index) & "<option value=''>"&xxPlsSel&"</option>"
					do while not rs2.EOF
						aOption(1,index) = aOption(1,index) & "<option value='"&rs2("optID")&"'>"&rs2("optName")
						if cDbl(rs2("optPriceDiff"))<>0 then
							aOption(1,index) = aOption(1,index) & " ("
							if cDbl(rs2("optPriceDiff")) > 0 then aOption(1,index) = aOption(1,index) & "+"
							if (rs2("optFlags") AND 1) = 1 then
								cacheThis=false
								aOption(1,index) = aOption(1,index) & FormatEuroCurrency((rs("pPrice")*rs2("optPriceDiff"))/100.0)&")"
							else
								aOption(1,index) = aOption(1,index) & FormatEuroCurrency(rs2("optPriceDiff"))&")"
							end if
						end if
						aOption(1,index) = aOption(1,index) & "</option>"&vbCrLf
						rs2.MoveNext
					loop
					aOption(1,index) = aOption(1,index) & "</select></td></tr>"
				end if
			end if
			if cacheThis then aOption(0,index) = Int(prodoptions(0,rowcounter))
			rs2.Close
		end if
		response.write Replace(Replace(aOption(1,index),"optnPLACEHOLDER","optn"&rowcounter),"updatepricePLACEHOLDER","updateprice"&Count,1,1)
	next
	response.write "</table>"
end if
%></font></b></p>
                </td>
              </tr>
              <tr>
			    <td width="20%" valign="top"><% if useemailfriend then %><b><font color="#FFFFFF" face="Times New Roman">
<a href="javascript:openEFWindow('<%=Server.URLEncode(prodid)%>')"><strong><%=xxEmFrnd%></strong></a>
<% else %> </font></b><b><font color="#FFFFFF" face="Times New Roman">&nbsp;
<% end if %></font></b></td>
                <td width="60%" align="center" valign="top" colspan="2">
				<%	if noprice=true then
						response.write "&nbsp;"
					else
						if cDbl(rs("pListPrice"))<>0.0 then response.write Replace(xxListPrice, "%s", FormatEuroCurrency(rs("pListPrice"))) & "<BR>"
						if cDbl(rs("pPrice"))=0 AND pricezeromessage<>"" then
							response.write pricezeromessage
						else
							response.write "<b>" & xxPrice & ":</b> <span class=""price"" id=""pricediv" & Count & """ name=""pricediv" & Count & """>" & FormatEuroCurrency(rs("pPrice")) & "</span> "
							if showtaxinclusive=true AND (rs("pExemptions") AND 2)<>2 then response.write Replace(ssIncTax,"%s", "<span id=""pricedivti" & Count & """ name=""pricedivti" & Count & """>" & FormatEuroCurrency(rs("pPrice")+(rs("pPrice")*countryTax/100.0)) & "</span> ")
							response.write "<br>"
							if currencyseparator="" then currencyseparator=" "
							if currRate1<>0 AND currSymbol1<>"" then response.write "<span id=""pricediv1c" & Count & """ name=""pricediv1c" & Count & """>" & FormatNumber(rs("pPrice")*currRate1, checkDPs(currSymbol1)) & " <b>" & currSymbol1 & "</b></span>" & currencyseparator
							if currRate2<>0 AND currSymbol2<>"" then response.write "<span id=""pricediv2c" & Count & """ name=""pricediv2c" & Count & """>" & FormatNumber(rs("pPrice")*currRate2, checkDPs(currSymbol2)) & " <b>" & currSymbol2 & "</b></span>" & currencyseparator
							if currRate3<>0 AND currSymbol3<>"" then response.write "<span id=""pricediv3c" & Count & """ name=""pricediv3c" & Count & """>" & FormatNumber(rs("pPrice")*currRate3, checkDPs(currSymbol3)) & " <b>" & currSymbol3 & "</b></span>"
						end if
					end if %><b><font color="#FFFFFF" face="Times New Roman">
                </font></b>
				</td> 
                <td width="20%" align="right" valign="top">
<%
if nobuyorcheckout=true then
	response.write "&nbsp;"
else
	if useStockManagement then
		isInStock = Int(rs("pInStock")) > 0
	else
		isInStock = Int(rs("pSell")) <> 0
	end if
	if isInStock then
%><font color="#FFFFFF"><b><font face="Times New Roman">
<input type="hidden" name="id" value="<%=rs("pID")%>">
<input type="hidden" name="mode" value="add">
<input type="hidden" name="frompage" value="<%=Request.ServerVariables("URL")&IIfVr(Trim(Request.ServerVariables("QUERY_STRING"))<>"","?","")&Request.ServerVariables("QUERY_STRING")%>">
</font></b></font>
<% if showquantondetail=true then %><font color="#FFFFFF"><b><font face="Times New Roman"><input type="text" name="quant" size="2" value="1"><% end if %><input align="absmiddle" type="image" src="images/buy.gif" border="0"><%
	else
		response.write "<b>"&xxOutStok&"</b>"
	end if
end if			%></td>
            </tr>
<%
rs.Close
cnn.Close
%> </font></b></font><font face="Times New Roman"> 
            </table>
<% else ' if usedetailbodyformat=2 %><b><font color="#FFFFFF"> </font></b>
</font>
			<table width="<%=innertablewidth%>" border="0" cellspacing="<%=innertablespacing%>" cellpadding="<%=innertablepadding%>" bgcolor="<%=innertablebg%>">
              <tr> 
                <td width="30%" align="center" valign="middle"> <%
				if NOT (Trim(rs("pLargeImage"))="" OR IsNull(rs("pLargeImage")) OR Trim(rs("pLargeImage"))="prodimages/") then %><b><font color="#FFFFFF" face="Times New Roman">
                </font></b><b><font color="#FFFFFF" face="Times New Roman"> 
                  <img src="<%=rs("pLargeImage")%>" border="0" alt="<%=Replace(rs("pName"),"""","&quot;")%>"> <%
				elseif NOT (Trim(rs("pImage"))="" OR IsNull(rs("pImage")) OR Trim(rs("pImage"))="prodimages/") then %> 
                  <img src="<%=rs("pImage")%>" border="0" alt="<%=Replace(rs("pName"),"""","&quot;")%>"> <%
				else %> &nbsp; <%
				end if %> </font></b> 
                </td>
				<td>&nbsp;</td>
				<td width="70%" valign="top"> 
                  <p><font color="#FFFFFF" face="Times New Roman"><b><% if showproductid=true then response.write "<b>" & xxPrId & ":</b> " & rs("pID") & "<br>" %><%=rs("pName")&xxDot%><% if alldiscounts<>"" then response.write " <font color=""#FF0000""><strong>"&xxDsApp&"</strong><br><font size=""1"">" & alldiscounts & "</font></font>" %><br>
				  <% shortdesc = Trim(rs("pDescription"))
				longdesc = Trim(rs("pLongDescription"))
				if longdesc<>"" then
					response.write longdesc&"<BR>"
				elseif shortdesc<>"" then
					response.write shortdesc&"<BR>"
				end if
				if noprice=true then
					response.write "&nbsp;"
				else
					if cDbl(rs("pListPrice"))<>0.0 then response.write Replace(xxListPrice, "%s", FormatEuroCurrency(rs("pListPrice"))) & "<BR>"
					if cDbl(rs("pPrice"))=0 AND pricezeromessage<>"" then
						response.write pricezeromessage
					else
						response.write "<b>" & xxPrice & ":</b> <span class=""price"" id=""pricediv" & Count & """ name=""pricediv" & Count & """>" & FormatEuroCurrency(rs("pPrice")) & "</span> "
						if showtaxinclusive=true AND (rs("pExemptions") AND 2)<>2 then response.write Replace(ssIncTax,"%s", "<span id=""pricedivti" & Count & """ name=""pricedivti" & Count & """>" & FormatEuroCurrency(rs("pPrice")+(rs("pPrice")*countryTax/100.0)) & "</span> ")
						response.write "<br>"
						if currencyseparator="" then currencyseparator=" "
						if currRate1<>0 AND currSymbol1<>"" then response.write "<span id=""pricediv1c" & Count & """ name=""pricediv1c" & Count & """>" & FormatNumber(rs("pPrice")*currRate1, checkDPs(currSymbol1)) & " <b>" & currSymbol1 & "</b></span>" & currencyseparator
						if currRate2<>0 AND currSymbol2<>"" then response.write "<span id=""pricediv2c" & Count & """ name=""pricediv2c" & Count & """>" & FormatNumber(rs("pPrice")*currRate2, checkDPs(currSymbol2)) & " <b>" & currSymbol2 & "</b></span>" & currencyseparator
						if currRate3<>0 AND currSymbol3<>"" then response.write "<span id=""pricediv3c" & Count & """ name=""pricediv3c" & Count & """>" & FormatNumber(rs("pPrice")*currRate3, checkDPs(currSymbol3)) & " <b>" & currSymbol3 & "</b></span>"
					end if
					response.write "<hr width=""80%"">"
				end if %> </b></font>
				</p> 
  #9 (permalink)  
Antiguo 22/07/2004, 16:36
 
Fecha de Ingreso: julio-2004
Mensajes: 7
Antigüedad: 20 años, 9 meses
Puntos: 0
Tuvieron que ser 3 partes!

Código HTML:
<p align="center">
<b><font color="#FFFFFF" face="Times New Roman">
<%
if IsArray(prodoptions) then
	response.write "<table border='0' cellspacing='1' cellpadding='1' width='100%'>"
	for rowcounter=0 to UBOUND(prodoptions,2)
		index=0
		gotSelection=false
		cacheThis=true
		do while index < (maxprodopts-1) AND aOption(0,index)<>0
			if aOption(0,index)=Int(prodoptions(0,rowcounter)) then
				gotSelection=true
				exit do
			end if
			index = index + 1
		loop
		if NOT gotSelection then
			sSQL="SELECT optID,optName,optfImage,optGrpName,optPriceDiff,optType,optFlags FROM options INNER JOIN optionGroup ON options.optGroup=optionGroup.optGrpID WHERE optGroup="&prodoptions(0,rowcounter)&" ORDER BY optID"
			rs2.Open sSQL,cnn,0,1
			if NOT rs2.EOF then
				if Abs(Int(rs2("optType")))=3 then
					fieldHeight = cInt((cDbl(rs2("optPriceDiff"))-Int(rs2("optPriceDiff")))*100.0)
					aOption(1,index) = "<tr><td align='right' width='30%'>"&rs2("optGrpName")&":</td><td> <input type='hidden' name='optnPLACEHOLDER' value='"&rs2("optID")&"'>"
					if fieldHeight<>1 then
						aOption(1,index) = aOption(1,index) & "<textarea wrap='virtual' name='voptnPLACEHOLDER' cols='"&atb(Int(rs2("optPriceDiff")))&"' rows='"&fieldHeight&"'>"
						aOption(1,index) = aOption(1,index) & rs2("optName")&"</textarea>"
					else
						aOption(1,index) = aOption(1,index) & "<input maxlength='255' type='text' name='voptnPLACEHOLDER' size='"&atb(Int(rs2("optPriceDiff")))&"' value="""&Replace(rs2("optName"),"""","&quot;")&""">"
					end if
					aOption(1,index) = aOption(1,index) & "</td></tr>"
				else
					aOption(1,index) = "<tr><td align='right' width='30%'>"&rs2("optGrpName")&":</td><td> <select class=""prodoption"" onChange='updatepricePLACEHOLDER();' name='optnPLACEHOLDER' size='1'>"
					if Int(rs2("optType"))>0 then aOption(1,index) = aOption(1,index) & "<option value=''>"&xxPlsSel&"</option>"
					do while not rs2.EOF
						aOption(1,index) = aOption(1,index) & "<option value='"&rs2("optID")&"'>"&rs2("optName")
						if cDbl(rs2("optPriceDiff"))<>0 then
							aOption(1,index) = aOption(1,index) & " ("
							if cDbl(rs2("optPriceDiff")) > 0 then aOption(1,index) = aOption(1,index) & "+"
							if (rs2("optFlags") AND 1) = 1 then
								cacheThis=false
								aOption(1,index) = aOption(1,index) & FormatEuroCurrency((rs("pPrice")*rs2("optPriceDiff"))/100.0)&")"
							else
								aOption(1,index) = aOption(1,index) & FormatEuroCurrency(rs2("optPriceDiff"))&")"
							end if
						end if
						aOption(1,index) = aOption(1,index) & "</option>"&vbCrLf
						rs2.MoveNext
					loop
					aOption(1,index) = aOption(1,index) & "</select></td></tr>"
				end if
			end if
			if cacheThis then aOption(0,index) = Int(prodoptions(0,rowcounter))
			rs2.Close
		end if
		response.write Replace(Replace(aOption(1,index),"optnPLACEHOLDER","optn"&rowcounter),"updatepricePLACEHOLDER","updateprice"&Count,1,1)
	next
	if nobuyorcheckout<>true then
%> </font></b>
	<tr><td align="right">&nbsp;</td><td>
      <p align="center">
      <img src="<%=optfImage%>" border="0">
      </td></tr>
	<tr><td align="right"><%=xxQuant%><b><font color="#FFFFFF" face="Times New Roman">:</font></b></td><td>
      <font color="#FFFFFF" face="Times New Roman"><b><input type="text" name="quant" size="<%=atb(4)%>" value="1"></b></font></td></tr>
<%
	end if
	response.write "</table>"
else
	if nobuyorcheckout<>true then
%><b><font color="#FFFFFF" face="Times New Roman"> </font></b>
	<table border='0' cellspacing='1' cellpadding='1' width='100%'>
	<tr><td align="right"><%=xxQuant%><b><font color="#FFFFFF" face="Times New Roman">:</font></b></td><td>
      <font color="#FFFFFF" face="Times New Roman"><b><input type="text" name="quant" size="<%=atb(4)%>" value="1"></b></font></td></tr>
	</table>
<%
	end if
end if
%></p>
<p align="center">
<font color="#FFFFFF"><b><font face="Times New Roman">
<%
if nobuyorcheckout=true then
	response.write "&nbsp;"
else
	if useStockManagement then
		isInStock = Int(rs("pInStock")) > 0
	else
		isInStock = Int(rs("pSell")) <> 0
	end if
	if isInStock then
%>
<input type="hidden" name="id" value="<%=rs("pID")%>">
<input type="hidden" name="mode" value="add">
<input type="hidden" name="frompage" value="<%=Request.ServerVariables("URL")&IIfVr(Trim(Request.ServerVariables("QUERY_STRING"))<>"","?","")&Request.ServerVariables("QUERY_STRING")%>">
<input type="image" src="images/buy.gif" border="0"><%
	else
		response.write "<b>"&xxOutStok&"</b>"
	end if
end if			%><br>
<% if previousid<>"" OR nextid<>"" then %>
				<% if previousid<>"" then %></font></b></font><font face="Times New Roman"><a href="proddetail.asp?prod=<%=previousid%>"><font color="#FFFFFF"><b><% end if %>&laquo; Previous<% if previousid<>"" then %></b></font></a><b><font color="#FFFFFF"><% end if %> | 
				<% if nextid<>"" then %></font></b><a href="proddetail.asp?prod=<%=nextid%>"><font color="#FFFFFF"><b><% end if %>Next &raquo;<% if nextid<>"" then %></b></font></a><b><font color="#FFFFFF"><% end if %>
                <br>
<% end if %> </font></b></font>
<hr width="80%"></p>
<% if useemailfriend then %><b><font color="#FFFFFF" face="Times New Roman">
</font></b>
<p align="center"><font face="Times New Roman"><a href="javascript:openEFWindow('<%=Server.URLEncode(prodid)%>')"><strong>
<font color="#FFFFFF"><%=xxEmFrnd%></font></strong></a></p>
<% end if %><b><font color="#FFFFFF">
</td>
            </tr>
<%
rs.Close
cnn.Close
%> </font></b></font> 
            </table>
<% end if ' usedetailbodyformat
%>
			</form>
          </td>
        </tr>
      </table>
<%
end if ' rs.EOF
%> 
  #10 (permalink)  
Antiguo 23/07/2004, 15:42
 
Fecha de Ingreso: julio-2004
Mensajes: 7
Antigüedad: 20 años, 9 meses
Puntos: 0
Up! .........
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:23.