Foros del Web » Programando para Internet » Javascript »

Me dan una mano con esto???

Estas en el tema de Me dan una mano con esto??? en el foro de Javascript en Foros del Web. Buenas toy terminando un listado con carro de compras xxxxxxxxx.lacasadelhard.com.ar/probando2.php me falta desarrollar la parte del carro, es decir un listado q vaya incluyendo lo ...
  #1 (permalink)  
Antiguo 19/01/2007, 11:14
 
Fecha de Ingreso: enero-2007
Mensajes: 51
Antigüedad: 17 años, 4 meses
Puntos: 0
Me dan una mano con esto???

Buenas toy terminando un listado con carro de compras

xxxxxxxxx.lacasadelhard.com.ar/probando2.php

me falta desarrollar la parte del carro, es decir un listado q vaya incluyendo lo que el cliente va seleccionando, con el total del importe abonar.
Me dan una mano, alguien se ofrece para el desarrollo?
  #2 (permalink)  
Antiguo 22/01/2007, 21:01
 
Fecha de Ingreso: enero-2007
Mensajes: 51
Antigüedad: 17 años, 4 meses
Puntos: 0
Pregunta Re: Me dan una mano con esto???

yo debuelta, les dejo el codigo, aunque sea demen un consejo por favor
Código:
<html> 
<head> 
<title>Art&iacute;culos - La Casa del Hard</title> 
<script type="text/javascript">

function habilitar(indice)
{
	if (document.getElementById('check'+indice).checked)
	{
		document.getElementById('caja'+indice).style.visibility = 'visible';
		document.getElementById('caja'+indice).value = "1";
		document.getElementById('caja'+indice).focus();
		document.getElementById('tr'+indice).style.fontWeight = "bold";
		document.getElementById('tr'+indice).style.backgroundColor = "#CCCCCC";
	} else {
		document.getElementById('caja'+indice).style.visibility = 'hidden';
		document.getElementById('caja'+indice).value = "";
		document.getElementById('tr'+indice).style.fontWeight = "normal";
		document.getElementById('tr'+indice).style.backgroundColor = "#FFFFFF";
	}
}
</script>


<STYLE>
</STYLE>
<style type="text/css">
<!--
body,td,th {
	font-family: Courier New, Courier, mono;
	font-size: 12px;
}
.Estilo5 {
	font-size: 24px;
	font-family: "Avril Lavigne (sk8er_punkd@hotm";
}
.Estilo6 {
	font-size: 18px;
	font-family: "Avril Lavigne (sk8er_punkd@hotm";
	font-weight: bold;
	color: #000000;
}
.Estilo7 {font-size: 12px}
.Estilo9 {font-family: "Wild Ride"; font-size: 96px; color: #000000;}
.Estilo10 {font-size: 24px; font-family: "Avril Lavigne (sk8er_punkd@hotm"; color: #000000;}
.Estilo16 {font-size: 16px; font-family: "Avril Lavigne (sk8er_punkd@hotm";}
.Estilo18 {font-size: 16}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head> 
<body> 

<script language="javascript"> 

function solonumeros(){ 
var key=window.event.keyCode;//codigo de tecla. 
if (key < 48 || key > 57){//si no es numero  
window.event.keyCode=0;//anula la entrada de texto. 
}} 
</script>  
<script language="JavaScript">

// By Mike Hall ([email protected])
var NS4 = (document.layers); 
var IE4 = (document.all);
var win = window;    // Con frames usar top.nombre.window;
var n   = 0;

function findInPage(str) {
  var txt, i, found;
  if (str == "")
    return false;
  if (NS4) {
    if (!win.find(str))
      while(win.find(str, false, true))
        n++;
    else
      n++;
    if (n == 0)
      alert("Not found.");
  }
  if (IE4) {
    txt = win.document.body.createTextRange();
    for (i = 0; i <= n && (found = txt.findText(str)) != false; i++) {
      txt.moveStart("character", 1);
      txt.moveEnd("textedit");
    }
    if (found) {
      txt.moveStart("character", -1);
      txt.findText(str);
      txt.select();
      txt.scrollIntoView();
      n++;
    }
    else {
      if (n > 0) {
        n = 0;
        findInPage(str);
      }
      else
        alert("Not found.");
    }
  }
  return false;
}
</script>
<form name="search" onSubmit="return findInPage(this.string.value);">
  <table width="200" border="0" align="center">
    <tr>
      <td height="108"><div align="center"><span class="Estilo5"><img src="/images/IM1.jpg" width="174" height="63"></span><font size="3">
          <input name="string" type="text" size="15"
  onChange="n = 0;">
          </font>
               <input name="submit" type="submit" value="Buscar">
        </div>
          <p></p></td>
      <td><img src="/images/IM2.jpg" width="158" height="66"></td>
      <td><img src="/images/IM3.jpg" width="117" height="71"></td>
      <td><p><img src="/images/IM4.jpg" alt="Imprimir" width="86" height="74"></p>
      </td>
      <td><img src="/images/IM5.jpg" alt="Agegar a tus favoritos" width="85" height="72"></td>
      <td><img src="/images/IM6.jpg" alt="Recomendar a un amigo" width="88" height="69"></td>
    </tr>
  </table>
</form>
<div align="center">
  <pre><img src="/images/titular.jpg" width="693" height="141"></pre>
  <div align="left">
    <pre><span class="Estilo5">
LISTA DE PRECIOS </span><span class="Estilo6">IVA incluido
</span><?php 

function fechasistema(){ 
	$dias = array("Monday"    => "Lunes"     ,"Lunes"     => "Monday", 
				  "Tuesday"   => "Martes"    ,"Martes"    => "Tuesday", 
				  "Wednesday" => "Miercoles" ,"Miercoles" => "Wednesday", 
				  "Thursday"  => "Jueves"    ,"Jueves"    => "Thursday", 
				  "Friday"    => "Viernes"   ,"Viernes"   => "Friday", 
				  "Saturday"  => "Sabado"    ,"Sabado"    => "Saturday", 
				  "Sunday"    => "Domingo"   ,"Domingo"   => "Sunday" ); 

	$mes = array("January"   =>"Enero"      ,"Enero"      => "January", 
				 "February"  =>"Febrero"    ,"Febrero"    => "February", 
				 "March"     =>"Marzo"      ,"Marzo"      => "March", 
				 "April"     =>"Abril"      ,"Abril"      => "April", 
				 "May"       =>"Mayo"       ,"Mayo"       => "May", 
				 "June"      =>"Junio"      ,"Junio"      => "June", 
				 "July"      =>"Julio"      ,"Julio"      => "July", 
				 "August"    =>"Agosto"     ,"Agosto"     => "August", 
				 "September" =>"Septiembre" ,"Septiembre" => "September", 
				 "October"   =>"Octubre"    ,"Octubre"    => "October", 
				 "November"  =>"Noviembre"  ,"Noviembre"  => "November", 
				 "December"  =>"Diciembre"  ,"Diciembre"  => "December"); 
	$fecha = $dias[date("l")] . ", " .date("d"). " de ". $mes[date("F")]. " ".date("Y"); 
	return $fecha; 
}


echo "LISTA ACTUALIZADA: ";
echo fechasistema();

function Conectarse() 
{ 
if (!($link=mysql_connect("xxxxxxxxx","xxxxxxxxxxx","xxxxxxxxxx"))) 
{ 
echo "Error conectando a la base de datos."; 
exit(); 
} 
if (!mysql_select_db("xxxxxxxxxxx_xxxxxxx",$link)) 
{ 
echo "Error seleccionando la base de datos."; 
exit(); 
} 
return $link; 
}


$link=Conectarse(); 
$result=mysql_query("select * from listado",$link); 
?> </pre>
  </div>
</div>

<TABLE width="707" BORDER=0 align="center" CELLPADDING=1 CELLSPACING=1>
<TR>
  <TD width="19"><div align="left" class="Estilo7"></div></TD>
<TD width="54" class="Estilo16">COD</TD>
<TD width="314" class="Estilo16"> DETALLE</TD>
<TD width="93" class="Estilo16">PRECIO</TD>
<TD width="189" class="Estilo16 Estilo18">CATEGORIA&nbsp;</TD>
<TD width="93" class="Estilo16">CANTIDAD</TD>
</TR> 

<?php 
 
$i = 1;
while($row = mysql_fetch_array($result)) { 
printf("<tr id=\"tr". $i ."\"> 
<td> <input name=\"nombre". $i ."\" type=\"checkbox\" onclick=\"habilitar('". $i ."')\" value=\"%s\" id=\"check". $i ."\"></td> 
<td> %s</td> 
<td> %s </td> 
<td> uSs %s </td> 
<td> %s  </td>
<td><input type=\"text\" name=\"caja". $i ."\" id=\"caja". $i ."\" onKeyPress=\"solonumeros()\" style=\"visibility: hidden\" size=\"5\"></td>
</tr>"


,$row["precio"] 
,$row["codigo"] 
,str_pad($row["detalle"], 40, '.',STR_PAD_RIGHT) 
,$row["precio"] 
,$row["categoria"]); 
$i++;
}


mysql_free_result($result); 
mysql_close($link); 
?> 
</table> 

</body> 
</html>
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 12:46.