Results displaying prematurely on the page

B

Bill

I have a page that runs a function. The function simply adds a dot to
a group of numbers. The function works fine, however, the results kick
out prematurly on the page. What I mean by this is that the numbers
are supposed to be part of an href query that is concatenated to the
end of the string, and is supposed to be hidden from view. So it
should look like this

Book Title One
Book Title Two
Book Title Three

with a hyperlink on each title so a person can click on it and get the
detail info. However, what is happening is this:

08307.5321
08307.3321
08307.4669

Book Title One
Book Title Two
Book Title Three

I don't know why the numbers are appearing at the top, although I know
it has something to do with the way ASP processes code, and what it
chooses first. How can I get this function to run and kick out the
results in order? The code is as follows, showing the function
included:


do while not rs.eof
response.write "<tr bgcolor=FFFFCC>"
response.write "<td><font face=verdana size=1><a
href=v_detail_products.asp?isbn=" & adddot(rs("isbn_copy")) & _
">" & rs("title") & "</a></td>"

The function is called adddot, and I'm adding it to the
rs("isbn_copy") field.

Thanks if you can help!

Bill
 
R

Ray at

What does adddot(arg) look like? And does your resultant html look like
what you want it to look like? I'm going to say no. Are you closing your
<tr>'s?

Ray at work
 
R

Randy Rahbar

I have a page that runs a function. The function simply adds a dot to
a group of numbers. The function works fine, however, the results kick
out prematurly on the page. What I mean by this is that the numbers
are supposed to be part of an href query that is concatenated to the
end of the string, and is supposed to be hidden from view. So it
should look like this

Do you have a response.write in your function? Show the code for you
function... that's probably where the problem is.
 
D

Dave Anderson

Bill said:
I don't know why the numbers are appearing at the top, although
I know it has something to do with the way ASP processes code,
and what it chooses first. How can I get this function to run
and kick out the results in order? The code is as follows,
showing the function included...

Look at your generated source code. You will find that the numbers are
written inside the <TABLE>, but outside any cells.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
S

Shailesh Humbad

In addition to others' comments, I'd also recommend placing quotation
marks around the href using Chr(34), like this:

response.write _
"<td><font face=verdana size=1><a
href="&Chr(34)&"v_detail_products.asp?isbn=" &_
adddot(rs("isbn_copy")) & Chr(34)& _
">" & rs("title") & "</a></td>"

Shailesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top