473,830 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS ASP expected ')'

8 New Member
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>")
Jan 30 '08 #1
13 3193
drhowarddrfine
7,435 Recognized Expert Expert
I think you might have your quotes mismatched but this is an asp problem so I'll send this there.
Jan 30 '08 #2
CroCrew
564 Recognized Expert Contributor
hello johneecc,

Have a look at this:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <head>
  3.     <title>Example</title>
  4.     <style type="text/css" media="screen, projection">
  5.         .hoverbox
  6.         {
  7.             cursor: default;
  8.             list-style: none;
  9.         }
  10.  
  11.         .hoverbox a
  12.         {
  13.             cursor: default;
  14.             position: relative;
  15.         }
  16.  
  17.         .hoverbox a .preview
  18.         {
  19.             display: none;
  20.         }
  21.  
  22.         .hoverbox a:hover .preview
  23.         {
  24.             display: block;
  25.             position: absolute;
  26.             z-index: 1;
  27.             top: -38px;
  28.             left: -50px;
  29.         }
  30.  
  31.         .hoverbox img
  32.         {
  33.             background: #fff;
  34.             border-color: #aaa #ccc #ddd #bbb;
  35.             border-style: solid;
  36.             border-width: 1px;
  37.             color: inherit;
  38.             padding: 2px;
  39.             vertical-align: top;
  40.             width: 100px;
  41.             height: 75px;
  42.         }
  43.  
  44.         .hoverbox li
  45.         {
  46.             background: #eee;
  47.             border-color: #ddd #bbb #aaa #ccc;
  48.             border-style: solid;
  49.             border-width: 1px;
  50.             color: inherit;
  51.             display: inline;
  52.             float: left;
  53.             margin: 3px;
  54.             padding: 5px;
  55.             position: relative;
  56.             position: static;
  57.         }
  58.  
  59.         .hoverbox .preview
  60.         {
  61.             border-color: #000;
  62.             width: 200px;
  63.             height: 150px;
  64.         }
  65.  
  66.         .hoverbox a:hover
  67.         {
  68.             display: block;
  69.             font-size: 100%;
  70.             z-index: 1;
  71.         }
  72.  
  73.     </style>
  74.     </head>
  75.     <body>
  76.         <%
  77.             Response.Write("<table width='500' align='center'><tr><td><ul class='hoverbox'>")
  78.                 Response.Write("<li>")
  79.                 Response.Write("<a href='#'>")
  80.                 Response.Write("<img src='Image_Web_Gallery\Image_" & rsGetRecords("StaticImageTimedNumber") & ".jpg'>"
  81.                 Response.Write("<img src='Image_Web_Gallery\Image_" & rsGetRecords("StaticImageTimedNumber") & ".jpg' class='preview'></a>")
  82.                 Response.Write("</li>")
  83.             Response.Write("</ul></td></tr></table>")
  84.         %>
  85.     </body>
  86. </html>
  87.  
  88.  
Jan 30 '08 #3
johneecc
8 New Member
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>")
Jan 30 '08 #4
CroCrew
564 Recognized Expert Contributor
whatt is in rsGetRecords("S taticImageDescr iption")? Can you give an example.

Thanks~
Jan 30 '08 #5
johneecc
8 New Member
This is a description of the image coming from an Access DB. It is only text.
Jan 30 '08 #6
johneecc
8 New Member
rsGetRecords is a recordset for retreiving from the DB. I am looping through using vbscript to display the info.
Jan 30 '08 #7
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.
Jan 30 '08 #8
DrBunchman
979 Recognized Expert Contributor
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
Jan 31 '08 #9
johneecc
8 New Member
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") & "&nbsp;</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.
Jan 31 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

4
44878
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) {
5
5222
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>
3
3196
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")
7
92140
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...
1
3918
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...
6
5334
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 {
5
7981
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
1
1416
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;
10
15779
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)
9
27645
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...
0
9777
marktang
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...
0
10763
Oralloy
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...
0
10473
jinu1996
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...
0
10196
tracyyun
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...
0
6939
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();...
0
5614
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...
0
5772
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4407
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
3
3070
bsmnconsultancy
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.