Cant get data from table after clicking url link. Pleaseadvise.

Ask a Question related to Coldfusion Database Access, Design and Development.

  1. #1

    Default Cant get data from table after clicking url link. Pleaseadvise.

    I am setting up an auction listing website. I have an upload page delivering
    data to a table called auctions which contains the columns of name, date, time,
    address, city, state, zip, etc. I view the data in that table thru web page
    called auctiondates.cfm. This page has the columns of name, date, time, etc.
    Each row has its pertinent data listed of course for each individual auction.
    Its actually similar to the actual db table except for sorting. Upload and
    viewing functionality works fine. I need to be able to click on the column name
    of a particular auction and get a new page with further details about that
    paritcular auction that I clicked on. I am not concerned about the final page
    content as it will be populated by different table data. Any ideas would be
    appreciated.

    DS2 Guest

  2. Similar Questions and Discussions

    1. Clicking on link makes page jump to top
      Hello, I have a page where a link will dynamically hide and show a table (using javascript to change the table's style display:none and...
    2. Starting a video in a layer when clicking on a link
      Hi I was wondering if there was any dhtml or java script for showing a video clip in a layer when clicking on a link. what im realy aiming for is to...
    3. Sort a repeat region in a table by clicking on the table headers
      Sort a repeat region in a table by clicking on the table headers for ASP some help on this topic pls.. Rgds MeTin
    4. NEW User: How do I display table on DataGrid without clicking on '+'.
      Hi, I have been trying display data from an Access database in my C# form. I have got to the point where I have stored data from the database into...
    5. How can I send data to a Flash file (swf), by clicking on a html link?
      How can I send data to a Flash file (swf), by clicking on a html link? (my english is bad) I have a little Flash movie, inside my html document...
  3. #2

    Default Re: Cant get data from table after clicking url link.Please advise.

    add a query string to the href attribute in your anchor tag. Look at the
    address bar in your browser right now. The url part end with messageview.cfm
    and the query string starts with the question mark. Notice that there is only
    one question mark and every other variable value pair is separated by an
    ampersand.

    Dan Bracuk Guest

  4. #3

    Default Re: Cant get data from table after clicking url link.Please advise.

    Thanks for the reply. I understand the concept, however I missing something.
    The view page is [url]http://cftest.deskmedia.com/auctiondates.cfm[/url] if you want to
    check it. I need to be able to click the name link which pulls up a page called
    customers.cfm and then that page be populated with related data from a table
    called auctiondates based on the url parameters passed to it. Perhaps my
    methodology is incorrect. Maybe there is an easier way.

    DS2 Guest

  5. #4

    Default Re: Cant get data from table after clicking url link.Please advise.

    The location link is perfect. The name link, not quite as good, yet.

    You want it to eventually resemble this
    ...customers.cfm&auctionid=2&auctiondate=2006-07-25

    which means your code will have to resemble this:
    <a
    href="customers.cfm?auctionid=#auctionid#&auctiond ate=#dateformat(auctiondate,
    'yyyy-mm-dd')#



    Dan Bracuk Guest

  6. #5

    Default Re: Cant get data from table after clicking url link.Please advise.

    Thank you. I see the auctiondates.cfm page passing the parameter...
    [url]http://cftest.deskmedia.com/customers.cfm?auctionid=14;[/url] which is the proper id
    of auction link that I clicked on. I just need to figure out how to get the
    customers.cfm page to take the id and match it against the id of the proper row
    in a table and then output all the data in that row so as to be visible on the
    customers.cfm page. If there is a page on the net about doing this I have not
    seen it yet.

    DS2 Guest

  7. #6

    Default Re: Cant get data from table after clicking url link.Please advise.

    I got it. Thanks again Dan. Here is what I used...

    <cfquery datasource="cftest" name="urlpass">
    SELECT *
    FROM auctions
    WHERE ID=#url.auctionid#
    </cfquery>

    <cfoutput query="urlpass">
    <p>Location: #address#, #city#, #state# #zip#</A></p>
    <p>Date: #month# #auctiondate#, #year#</p>
    <p>Time: #auctiontime# #ampm#</p>

    DS2 Guest

  8. #7

    Default Re: Cant get data from table after clicking url link.Please advise.

    why don't you write a query in the customers.cfm page that uses the url variable in the where clause?
    Dan Bracuk Guest

  9. #8

    Default Re: Cant get data from table after clicking url link.Please advise.

    Just started learning CF last week, so there probably are other ways to get the
    same result. Unfortunately, this project has a short time frame so I just need
    to get it working; even if its ugly :)
    The query code above is in the customers.cfm page; unless you are referring to
    some other way to code it. I just know that when I click on various auctions
    listed on the auctiondates.cfm page, the proper id of the links is passed to
    the customers.cfm page. This in turn does display the proper relevant data for
    the particular auction of the passed id. Here is the line in auctiondates.cfm
    that passes the id...

    <A href="http://domain/customers.cfm?auctionid=#id#">#name#</A>

    DS2 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139