dbTalk Databases Forums  

Issue wit visual basic code in a HTML page

comp.database.ms-access comp.database.ms-access


Discuss Issue wit visual basic code in a HTML page in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JPRW
 
Posts: n/a

Default Issue wit visual basic code in a HTML page - 07-19-2004 , 10:22 PM






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



Reply With Quote
  #2  
Old   
King Ron
 
Posts: n/a

Default Re: Issue wit visual basic code in a HTML page - 07-20-2004 , 12:25 PM






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

Quote:
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

Reply With Quote
  #3  
Old   
JPRW
 
Posts: n/a

Default Re: Issue wit visual basic code in a HTML page - 07-26-2004 , 12:28 PM



Thanks a lot for your help.
I really appreciate it and know that I can count on this newsgroup.

Juan


"King Ron" <KingRonPoindexter (AT) covad (DOT) net> wrote

Quote:
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



Reply With Quote
  #4  
Old   
Walt White
 
Posts: n/a

Default Re: Issue wit visual basic code in a HTML page - 07-28-2004 , 10:37 PM



Test
"JPRW" <jprojas (AT) earthlink (DOT) net> wrote

Quote:
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






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.