Hi,
I am having a heck of a time trying to figure this one out. I am not a pro with CSS or ASP. I know VBScript fairly well.
There is a Expected ')' error in the line with the "a href" between the two <li> tags. It has to do with how I am trying to display the Description to screen.
What I am trying to do is display the description of the image and then when you hover/mouse over the description the image will appear.
Thanks for any help you can offer.
I managed to do this with an image preview, but switching this to text it isn't working.
Here is where I got the image working from: http://host.sonspring.com/hoverbox/
main site: http://sonspring.com/journal/hoverbox-image-gallery
Working code for the image preview:
Response.Write ("<tD ALIGN=""CENTER" " BGCOLOR=#FFFFFF >")
Response.Write ("<li>")
Response.Write ("<a href=""#"">
<img src=""Image_Web _Gallery\Image_ " & rsGetRecords("S taticImageTimed Number") & ".jpg"" /><img src=""Image_Web _Gallery\Image_ " & rsGetRecords("S taticImageTimed Number") & ".jpg"" class=""preview "" /></a>")
Response.Write ("</li>")
Response.Write ("</tD>")
What I am trying to do:
Response.Write ("<tD ALIGN=""CENTER" " BGCOLOR=#FFFFFF >")
Response.Write ("<li>")
Response.Write ("<a href=""rsGetRec ords("StaticIma geTimedDescript ion")""> rsGetRecords("S taticImageTimed Description") <img src=""Image_Web _Gallery\Image_ " & rsGetRecords("S taticImageTimed Number") & ".jpg"" class=""preview "" /></a>")
Response.Write ("</li>")
Response.Write ("</tD>")
13 3193
I think you might have your quotes mismatched but this is an asp problem so I'll send this there.
CroCrew 564
Recognized Expert Contributor
hello johneecc,
Have a look at this: -
<html>
-
<head>
-
<title>Example</title>
-
<style type="text/css" media="screen, projection">
-
.hoverbox
-
{
-
cursor: default;
-
list-style: none;
-
}
-
-
.hoverbox a
-
{
-
cursor: default;
-
position: relative;
-
}
-
-
.hoverbox a .preview
-
{
-
display: none;
-
}
-
-
.hoverbox a:hover .preview
-
{
-
display: block;
-
position: absolute;
-
z-index: 1;
-
top: -38px;
-
left: -50px;
-
}
-
-
.hoverbox img
-
{
-
background: #fff;
-
border-color: #aaa #ccc #ddd #bbb;
-
border-style: solid;
-
border-width: 1px;
-
color: inherit;
-
padding: 2px;
-
vertical-align: top;
-
width: 100px;
-
height: 75px;
-
}
-
-
.hoverbox li
-
{
-
background: #eee;
-
border-color: #ddd #bbb #aaa #ccc;
-
border-style: solid;
-
border-width: 1px;
-
color: inherit;
-
display: inline;
-
float: left;
-
margin: 3px;
-
padding: 5px;
-
position: relative;
-
position: static;
-
}
-
-
.hoverbox .preview
-
{
-
border-color: #000;
-
width: 200px;
-
height: 150px;
-
}
-
-
.hoverbox a:hover
-
{
-
display: block;
-
font-size: 100%;
-
z-index: 1;
-
}
-
-
</style>
-
</head>
-
<body>
-
<%
-
Response.Write("<table width='500' align='center'><tr><td><ul class='hoverbox'>")
-
Response.Write("<li>")
-
Response.Write("<a href='#'>")
-
Response.Write("<img src='Image_Web_Gallery\Image_" & rsGetRecords("StaticImageTimedNumber") & ".jpg'>"
-
Response.Write("<img src='Image_Web_Gallery\Image_" & rsGetRecords("StaticImageTimedNumber") & ".jpg' class='preview'></a>")
-
Response.Write("</li>")
-
Response.Write("</ul></td></tr></table>")
-
%>
-
</body>
-
</html>
-
-
Thanks for the reply, but that looks just like what I had.
I am just trying to display the description from a DB recordset of the image.
Originally, I had a thumbnail image and the preview was when the mouse hovered over it.
See code below:
I am able to display the default test text of "Image Preview", but when I plug in rsGetRecords("S taticImageDescr iption") I get the Expected ')' error.
Response.Write ("<a href=""#""> Image Preview <img src=""Static_Im age_Web_Gallery \Image_" & "00" & rsGetRecords("S taticImageTimed Number") & ".jpg"" class=""preview ""/></a>")
CroCrew 564
Recognized Expert Contributor
whatt is in rsGetRecords("S taticImageDescr iption")? Can you give an example.
Thanks~
This is a description of the image coming from an Access DB. It is only text.
rsGetRecords is a recordset for retreiving from the DB. I am looping through using vbscript to display the info.
CroCrew 564
Recognized Expert Contributor
Yes, I understand that. What I was asking is if you can give us an example of one of the records in your recordset.
I would hazard a guess that there is a double quote or other special character somewhere in one of your records.
I suggest you run the query in a query analyzer and check the records returned for any double quotes or other characters.
Let us know how you get on,
Dr B
What is the rule on quotes or double quotes?
For instance, by adding the double quotes made this line work:
<img src=""Image_Web _Gallery\Image_ " & rsGetRecords("S taticImageTimed Number") & ".jpg"" class=""preview "" /></a>")
I do not think it is a quote coming back from a record because I am able to display the image description before I was trying to link it up with the actual image.
Here is that line:
Response.Write ("<b>" & rsGetRecords("S taticImageTimed Description") & " </b>")
Here are some of the records:
Seattle Seahawks
Pittsburgh Steelers
Houston Texans
Tennessee Titans
Thanks for all your help too it is greatly appreciated.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Bill |
last post by:
I call a function in my .js file like this:
onClick="location.href='blank.html' +
generateSearchStringFromForm('section')"
where section is the name of my form.
The function is defined as follows:
myFunction(k) {
|
by: andy.herrera |
last post by:
I'm getting this Error Message. Expected ';'
Please Select One:
<form name="form1"> <<------------ Error is here.
<select name="selectTrans" onChange="If (this.value == 'checkout')
window.location.href='CheckOut.php';">
<option>---Please Select One ---</option>
<option value="checkout">Check OUT</option>
<option value="checkin">Check IN</option>
</select>
|
by: Jon |
last post by:
I'm learning about datatables. When using the example provided by MS in the
..NET Framework Class Library for DATATABLE (see below) I get an error on line
3 that says "Type expected". Is something missing from the code?
Thanks - Jon
Private Sub MakeParentTable()
' Create a new DataTable.
Dim myDataTable As Datatable = New Datatable("ParentTable")
|
by: Warrax |
last post by:
I am currently doing online tutorials for C++, and am pretty much stuck in a rut about this problem. It is saying that there's an expected unqualifed-id before '{' token (I will post the code in just a second) on line 11, and an expected ',' or ';' before '{' token also on line 11, however I don't have a clue what the first one means. The program is meant to save a user's name in a string variable within a structure, and to then show that name...
|
by: JOJO123 |
last post by:
I got here in search of an answer to this Javascrpt question. I upgraded jave on XP Ie 7, acrobat 5.1 and suddenly can't open any pdf files on web sites using IE.
I see u guys all say, this is a Javscript issue. but how do we, mere mortals who know nothing of anything about Java, scripts, etc, fix this? Is there a programm, does MS have any fix? is there any tweak like in the Registry, or whatever, how do I access anyihint java without in IE 7...
| |
by: Lawrence Spector |
last post by:
I ran into a problem using g++. Visual Studio 2005 never complained
about this, but with g++ I ran into this error. I can't figure out if
I've done something wrong or if this is a compiler bug. Here's a very
simple example which should illustrate what I'm doing.
#include <iostream>
template <class T>
class TestBase
{
|
by: amitmool |
last post by:
hi, i have used the queue library file and try to use the template as
template <class QueueItem>
queue <QueueItem>::~queue() // line 25
{
}
template <class QueueItem>
void queue<QueueItem>::push(const QueueItem& entry) // line 42
|
by: Hunternora |
last post by:
I'm just trying to count letters, by type etc. What am I doing wrong here?
import javax.swing.JOptionPane;
public class Asg3
{
public static void main(String args)
{
int aCount=0, eCount=0, iCount=0, oCount=0, uCount=0, upperCount=0;
|
by: preeya |
last post by:
Hi,
I have written the following program:
-------------------------------------------------------------------------------------------------------------
1 #include <stdio.h>
2 #include "abc.h"
3
4 void PROP_abc(double ptr)
|
by: erictheone |
last post by:
Ok so what I'm trying to do is create a trans location cipher. For those among us that don't know alot about cryptography it is a method for jumbling up letters to disguise linguistic patterns(words). What it does is takes a string as a parameter, determines length of string, tests if the length is a perfect square, if it is then it makes a 2-d array with its length and height equal to the lengths root. If it isn't then it cuts it down to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |