473,932 Members | 2,118 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
13 3200
DrBunchman
979 Recognized Expert Contributor
John,

Is the code you printed in your first post your actual working code? If so I think there is a little error which may be causing your problem. You wrote:

Expand|Select|Wrap|Line Numbers
  1. Response.Write ("<a href=""rsGetRecords("StaticImageTimedDescription")""> rsGetRecords("StaticImageTimedDescription") <img src=""Image_Web_Gallery\Image_" & rsGetRecords("StaticImageTimedNumber") & ".jpg"" class=""preview"" /></a>")
This needs to be changed to:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Response.Write("<a href=""" & rsGetRecords("StaticImageTimedDescription") & """>" & rsGetRecords("StaticImageTimedDescription") & "<img src=""Image_Web_Gallery\Image_" & rsGetRecords("StaticImageTimedNumber") & ".jpg"" class=""preview"" /></a>")
  3.  
Notice there are a couple more &'s in my version which are joining the strings and the requests together. By leaving out the &'s the string will think it has finished and expect a closing parenthesis ) .

Give that a try and let us know how it goes.

Cheers,

Dr B
Jan 31 '08 #11
DrBunchman
979 Recognized Expert Contributor
And in answer to your question about quote marks:

A double quote (") marks the beginning and end of a string. If you want to place a double quote inside a string you need to use two double quote marks (""). These are interpreted as one double quote mark inside the string.

However note that in most instances you can use a single quote inside a string instead of two doubles e.g

Response.Write( "<img src=""test.jpg" " alt=""test"" />")

Can be re-written as:

Response.Write( "<img src='test.jpg' alt='test' />")

Which looks much cleaner!

Hope this helps,

Dr B
Jan 31 '08 #12
CroCrew
564 Recognized Expert Contributor
Hello johneecc,

I would stay very clear from using double quotes. It is too easy to get turned around using them. My example above does not use them and when I tested it the results work for me. If it did not work for you then I think what DrBunchman said might be true in that something in your data is corrupt. Did you try out the example above?

Have a good day~
Jan 31 '08 #13
johneecc
8 New Member
DrBunchman, what you listed worked. aaaaahhhhh Thank you for solving my issue.
I also tried using the single quotes too and it also worked. Thank you for explaining the difference between all the quotes.

CroCrew thanks for all your help too. Greatly appreciated.
Jan 31 '08 #14

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

Similar topics

4
44880
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
5226
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
3206
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
92201
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
3924
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
5340
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
7991
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
1422
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
15793
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
27669
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
11499
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
11076
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
10639
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
9843
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8199
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7365
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
6059
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...
2
4432
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3486
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.