![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
Looks like you need to alter the way you use quotes inside your html stream: if (elbadet.Fields.Item("ebay").Value = -1) then Session.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 Session.Write "<img src=""images/content/ebay_auctions_inactive.gif"" width=""296"" height=""43"" border=""0"">" end if either use two double quotes together to send a double quote to the output stream else use single quotes inside the quoted html. Also remember you are passing the value contained in 'elbadet.Fields.Item("ruta_ebay").Value ' so you need to concatenate that value with the hard-coded output (not the reference to the recordset field) Rich Harrington Chi "JPRW" <jprojas (AT) earthlink (DOT) net> wrote 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 |
#4
| |||
| |||
|
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
| |