Ver Mensaje Individual
  #6 (permalink)  
Antiguo 31/01/2006, 08:16
Avatar de josemari11
josemari11
 
Fecha de Ingreso: agosto-2004
Ubicación: Fuenlabrada (Madrid)
Mensajes: 95
Antigüedad: 19 años, 8 meses
Puntos: 0
Ok, si lo que iba a hacer es eso, postear el código, no hay absolutamente nada que deba ocultar, así que allá va la parte donde está el script de vbs:

<SCRIPT language="vbscript">
sub Fechas(fInicial,fFinal)
f=document.Form.dateField.value
p=document.miForm.periodo.value
if p="Intervalo" then
fInicial=document.miForm.fInicial.value
fFinal=document.miform.fFinal.value
end if
if p="Diario" then
fInicial=Day(f) & "/" & Month(f) & "/" & Year(f)
fFinal=Day(DateAdd("d",1,f)) & "/" & Month(DateAdd("d",1,f)) & "/" & Year(DateAdd("d",1,f))
//msgBox "Diario del " & fInicial & " al " & fFinal
end if
if p="Semanal" then
diaSemana=datepart("w",f,vbMonday)-1
fInicial=Day(dateadd("d",diaSemana*-1,f)) & "/" & Month(dateadd("d",diaSemana*-1,f)) &"/"& Year(dateadd("d",diaSEmana*-1,f))
fFinal=Day(dateadd("d",7,fInicial)) & "/" & Month(dateadd("d",7,fInicial)) &"/"& Year(dateadd("d",7,fInicial))
//msgBox "Semanal del " & fInicial & " al " & fFinal
end if
if p="Mensual" then
fInicial="1/" & Month(f) & "/" & Year(f)
fFinal="1/" & Month(DateAdd("m",1,f)) & "/" & Year(DateAdd("m",1,f))
//msgBox "Mensual del " & fInicial & " al " & fFinal
end if
if p="Trimestral" then
mes= month(f)
if mes=1 or mes=2 or mes= 3 then
fInicial="1/1/" & Year(f)
fFinal="1/4/" & Year(f)
end if
if mes=4 or mes=5 or mes=6 then
fInicial="1/4/" & Year(f)
fFinal ="1/7/" & Year(f)
end if
if mes=7 or mes=8 or mes=9 then
fInicial="1/7/" & Year(f)
fFinal="1/10/" & Year(f)
end if
if mes=10 or mes=11 or mes=12 then
fInicial="1/10/" & Year(f)
fFinal="1/1/" & Year(dateadd("m",12,f))
end if
//msgBox "Trimestral del " & fInicial & " al " & fFinal
end if
if p="Anual" then
fInicial="1/1/" & Year(f)
fFinal="1/1/" & Year(DateAdd("m",12,f))
//msgBox "Anual del " & fInicial & " al " & fFinal
end if
end sub

sub saltoPortes()
Fechas fInicial,fFinal
parent.principal.location="proveedores/portes.asp?sqlWhere=WHERE%20'" & fInicial & "'<=%20pro2002f.fecha%20AND%20pro2002f.fecha<' " & fFinal & "' "
end sub

sub saltoCuotas()
Fechas fInicial,fFinal
parent.principal.location="proveedores/cuotas.asp?sqlWhere=WHERE%20'" & fInicial & "'<=%20pro2002f.fecha%20AND%20pro2002f.fecha<' " & fFinal & "'"
end sub

sub saltoVentas()
Fechas fInicial,fFinal
parent.principal.location="clientes/ventas.asp?fechaI=" & fInicial & "&fechaF=" & fFinal
end sub

sub saltoPresupuestos()
Fechas fInicial,fFinal
parent.principal.location="clientes/presupuestos.asp?fechaI=" & fInicial & "&fechaF=" & fFinal
end sub

sub saltoInexistencias()
Fechas fInicial,fFinal
parent.principal.location="clientes/inexistencias.asp?fechaI=" & fInicial & "&fechaF=" & fFinal
end sub

sub saltoProveedoresFacturas()
Fechas fInicial,fFinal
parent.principal.location="proveedores/facturas.asp?sqlWhere=WHERE%20'" & fInicial & "'<=%20fecha%20AND%20fecha<'" & fFinal & "'"
end sub

sub saltoImportar()
Fechas fInicial,fFinal
parent.principal.location="proveedores/importar.asp?sqlWhere=WHERE%20'" & fInicial & "'<=%20fecha%20AND%20fecha<'" & fFinal & "'"
end sub

sub saltoProveedoresExistencias()
Fechas fInicial,fFinal
parent.principal.location="proveedores/existencias.asp?sql=AND+'" & fInicial & "'<=%20fecha%20AND%20fecha<'" & fFinal & "'"
end sub

</SCRIPT>


Luego, dentro del body tengo el "Form"
<form name="Form">
<input type="hidden" name="dateField" value="<%= Date() %>">
</form>


Y otro miform, que no tiene mayor historia tampoco. Y luego los links de este estilo:
<li><A HREF="#" onClick="saltoVentas">Ventas</A></li>
<li><A HREF="#" onClick="saltoInexistencias">Inexistencias</A></li>
<li><A HREF="#" onClick="saltoPresupuestos">Presupuestos</A></li>