A href and asp prob

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

tallpaul

Thread Starter
Joined
Mar 27, 2006
Messages
23
hi iam trying to pass a variable in the querystring but all it seems to do is pass the querystring and then everything afterthat in the querystring, if anyone could help me please

this is the line that works ok before i changed anything

response.Write "<a href=" & rsgallery("piclrge") & ">" & ("<img src=") & rsgallery("picsmall") & " /></td>" & vbnewline

And this is where i am trying to send a query to a page that has gone wrong

response.Write "<a href=""gallery.asp?piclrge=" & rsgallery("piclrge") & ">" & ("<img src=") & rsgallery("picsmall") & " />



Many thanx if anyone can help


Tall Paul
 
Joined
Dec 13, 2006
Messages
38
response.Write "<a href=""gallery.asp?piclrge=" & rsgallery("piclrge") & ">" & ("<img src=") & rsgallery("picsmall") & " />
Try this instead:

response.Write "<a href='gallery.asp?piclrge=" & rsgallery("piclrge") & "'><img src='" & rsgallery("picsmall") & "' />

my asp is a little rough as I haven't done it in a while but I think that the problem is just having the quotes in there.... hopefully. ;)
 

tallpaul

Thread Starter
Joined
Mar 27, 2006
Messages
23
this is part of the code i am using

Problem line highlighted

<table id="gallerypics">
<% dim i
dim picsmall
dim piclrge
picsmall=rsgallery("picsmall")
piclrge=rsgallery("piclrge")
do while not rsgallery.eof
response.Write vbtab & ("<tr>") & vbnewline
for i =1 to 4
response.Write vbtab & vbtab & ("<td>")
response.Write "<a href='gallery.asp?piclrge=" & rsgallery("piclrge") & "'><img src='" & rsgallery("picsmall") & "' />
rsgallery.movenext
if rsgallery.eof then
i=6
end if
next
response.write vbtab & ("</tr>" & vbnewline)
loop
%>
</table>

This is the error iam getting

Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/mwmservices/building.asp, line 44

response.Write "<a href='gallery.asp?piclrge=" & rsgallery("piclrge") & "'><img src='" & rsgallery("picsmall") & "' />
----------------------------------------------------------------------------------------------------------^
 

tallpaul

Thread Starter
Joined
Mar 27, 2006
Messages
23
Thanx for that but i have tried and this is the error that i get now



This is the error now


Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/mwmservices/building.asp, line 44

response.Write "<a href='gallery.asp?piclrge=" & rsgallery("piclrge") & "'><img src='" & rsgallery("picsmall") & "' />""
------------------------------------------------------------------------------------------------------------^
 
Joined
Jul 29, 2001
Messages
21,334
Response.Write "<a href= gallery.asp?piclrge=" & rsgallery("piclrge") & "><img src= 'images/" & rsgallery("picsmall") & "'/>"

Use these tags <%= %> and you won't have to use Response.Write outside of your code blocks.
 

tallpaul

Thread Starter
Joined
Mar 27, 2006
Messages
23
Thanks rockn you was right the first time, what i did was add 2 double quotes anot one as you said and when i changed it , it worked, many thanks
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top