Results displaying prematurely on the page

Discussion in 'ASP General' started by Bill, Aug 5, 2003.

  1. Bill

    Bill Guest

    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
     
    Bill, Aug 5, 2003
    #1
    1. Advertising

  2. Bill

    Ray at Guest

    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

    "Bill" <> wrote in message
    news:...
    > 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
     
    Ray at, Aug 5, 2003
    #2
    1. Advertising

  3. Bill

    Randy Rahbar Guest

    > 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.
     
    Randy Rahbar, Aug 5, 2003
    #3
  4. "Bill" wrote:
    >
    > 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.
     
    Dave Anderson, Aug 5, 2003
    #4
  5. 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

    Bill wrote:
    > 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
     
    Shailesh Humbad, Aug 5, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tony Hsieh

    cache expiring prematurely

    Tony Hsieh, Aug 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    451
    Mark Fitzpatrick
    Aug 19, 2004
  2. =?Utf-8?B?RG9uYWxkIFNjb3R0?=

    Session ending prematurely - Forms Authentication

    =?Utf-8?B?RG9uYWxkIFNjb3R0?=, Jul 15, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    541
    =?Utf-8?B?RG9uYWxkIFNjb3R0?=
    Jul 20, 2005
  3. tshad

    dbReader closing prematurely

    tshad, Jan 11, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    2,028
    tshad
    Jan 11, 2006
  4. DC
    Replies:
    4
    Views:
    662
  5. Monique Y. Mudama
    Replies:
    1
    Views:
    457
    Monique Y. Mudama
    Jun 28, 2005
Loading...

Share This Page