Ayuda urgente con codigo ASP y Visual Basic para HTML; GRACIAS!

20/07/2004 - 05:22 por JPRW | Informe spam
Hello All.

I am having issues with the visualbasic gramatic for the following scenario:

I am retrieving information from an Access 2000 Database. The current fields
are:

ebay, which is a yes / no, showing as -1 or 0
ebay_path, which is a memo field with the ebay link to the product
auctioned.

within the HTML code, I have the following code:


-

<%
if elbadet.Fields.Item("ebay").Value = -1 then
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>" target="_blank"><img
src="images/content/ebay_auctions.gif" width="296" height="43" border="0">
else
<img src="images/content/ebay_auctions_inactive.gif" width="296" height="43"
border="0">
end if
%>
-

where
elbadet is the name of the recordset
ebay is the field having the value
ruta_ebay is the other field with the path


Once previewed :is giving me the following error

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

-
-

Technical Information (for support personnel)

a.. Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/lacany/TMP6hxrg14ri3.asp, line 62
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)


b.. Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

c.. Page:
GET /lacany/TMP6hxrg14ri3.asp

d.. Time:
Monday, July 19, 2004, 11:10:52 PM


e.. More information:
Microsoft Support
In plain english I need the statement to behave something like this
(pseudocode)

If the specified filed = -1 then show the active gif image and the link
else
show the inactive gif image
end if statent


Thanks in advance; any help is highly appreciated.

Juan Pablo Rojas
merca-web.com

Preguntas similare

Leer las respuestas

#1 joseba
20/07/2004 - 08:49 | Informe spam
Lo que yo veo es que te falta cerrar y abrir la secuencia
de comandos VBScript en algunos sitios.

Osea asi:

<%if elbadet.Fields.Item("ebay").Value = -1 then%>
<%else%>
<%end if%>

Un saludo.

<%
if elbadet.Fields.Item("ebay").Value = -1 then
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>"
target="_blank"><img
src="images/content/ebay_auctions.gif" width="296"
height="43" border="0">
else
<img src="images/content/ebay_auctions_inactive.gif"
width="296" height="43"
border="0">
end if
%>
Respuesta Responder a este mensaje
#2 Franco Figún
20/07/2004 - 17:12 | Informe spam
Firstly, this is a spanish group, but don't worry for that, pal...

Try this:

<%
if elbadet.Fields.Item('ebay').Value = -1 then
response.write "<a href='<%=(elbadet.Fields.Item('ruta_ebay').Value)%>'
target='_blank'><img src='images/content/ebay_auctions.gif' width='296'
height='43' border='0'>"
else
response.write "<img src='images/content/ebay_auctions_inactive.gif'
width='296' height='43' border='0'>"
end if
%>

Dont't forget the SIMPLE commas, and use the follow syntax in the beginning
of the page:

ON ERROR RESUME NEXT

FF
www.francofigun.com.ar
MSN:
Yahoo MSN:

"JPRW" wrote in message
news:Kd0Lc.8851$
Hello All.

I am having issues with the visualbasic gramatic for the following


scenario:

I am retrieving information from an Access 2000 Database. The current


fields
are:

ebay, which is a yes / no, showing as -1 or 0
ebay_path, which is a memo field with the ebay link to the product
auctioned.

within the HTML code, I have the following code:



<%
if elbadet.Fields.Item("ebay").Value = -1 then
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>"


target="_blank"><img
src="images/content/ebay_auctions.gif" width="296" height="43" border="0">
else
<img src="images/content/ebay_auctions_inactive.gif" width="296"


height="43"
border="0">
end if
%>

where
elbadet is the name of the recordset
ebay is the field having the value
ruta_ebay is the other field with the path


Once previewed :is giving me the following error

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

-

Technical Information (for support personnel)

a.. Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/lacany/TMP6hxrg14ri3.asp, line 62
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)


b.. Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

c.. Page:
GET /lacany/TMP6hxrg14ri3.asp

d.. Time:
Monday, July 19, 2004, 11:10:52 PM


e.. More information:
Microsoft Support
In plain english I need the statement to behave something like this
(pseudocode)

If the specified filed = -1 then show the active gif image and the link
else
show the inactive gif image
end if statent


Thanks in advance; any help is highly appreciated.

Juan Pablo Rojas
merca-web.com


Respuesta Responder a este mensaje
#3 JPRW
26/07/2004 - 19:28 | Informe spam
Muchas GRacias por tu colaboracion.

cuando tenga la pagina al aire te avisare para que la visites.

Cordialmente,

Juan Pablo Rojas


"JPRW" wrote in message
news:Kd0Lc.8851$
Hello All.

I am having issues with the visualbasic gramatic for the following


scenario:

I am retrieving information from an Access 2000 Database. The current


fields
are:

ebay, which is a yes / no, showing as -1 or 0
ebay_path, which is a memo field with the ebay link to the product
auctioned.

within the HTML code, I have the following code:



<%
if elbadet.Fields.Item("ebay").Value = -1 then
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)%>"


target="_blank"><img
src="images/content/ebay_auctions.gif" width="296" height="43" border="0">
else
<img src="images/content/ebay_auctions_inactive.gif" width="296"


height="43"
border="0">
end if
%>

where
elbadet is the name of the recordset
ebay is the field having the value
ruta_ebay is the other field with the path


Once previewed :is giving me the following error

HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services

-

Technical Information (for support personnel)

a.. Error Type:
Microsoft VBScript compilation (0x800A0400)
Expected statement
/lacany/TMP6hxrg14ri3.asp, line 62
<a href="<%=(elbadet.Fields.Item("ruta_ebay").Value)


b.. Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

c.. Page:
GET /lacany/TMP6hxrg14ri3.asp

d.. Time:
Monday, July 19, 2004, 11:10:52 PM


e.. More information:
Microsoft Support
In plain english I need the statement to behave something like this
(pseudocode)

If the specified filed = -1 then show the active gif image and the link
else
show the inactive gif image
end if statent


Thanks in advance; any help is highly appreciated.

Juan Pablo Rojas
merca-web.com


email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida