Professional Web Applications Themes

Creating a Link in a dg - Macromedia Flex General Discussion

I have a dg that is returning values from my db. One of the values that is returned from my cfc is a link to the file that is displayed in the dg. How can I make it so that when someone clicks on a record in the dg it opens a new browers to the returned value fld_docLink. IE I click on the record testrecord1. It opens a new browser window, and hte url is populated with the returned vaule from my cfc....

  1. #1

    Default Creating a Link in a dg

    I have a dg that is returning values from my db. One of the values that is
    returned from my cfc is a link to the file that is displayed in the dg. How can
    I make it so that when someone clicks on a record in the dg it opens a new
    browers to the returned value fld_docLink.

    IE I click on the record testrecord1. It opens a new browser window, and hte
    url is populated with the returned vaule from my cfc.

    rottmanja Guest

  2. #2

    Default Re: Creating a Link in a dg

    Well you will need to create a cellRenderer to display the link in the
    datagrid. I have an example of how to do this on my blog:

    [url]http://www.simb.net/blog/index.cfm/2006/1/9/Dispatch-Events-from-a-cellRenderer[/url]

    When you through the event you will want to stick the url in as a property of
    your event. Then when the parent object catches it you can use an AS function
    to load up a new window. :) I dont remember what the AS function to do that
    is though, sorry. See if this makes any sense after looking at the example.

    Simeon Guest

  3. #3

    Default Re: Creating a Link in a dg

    In fact in the comments on that page, jesse warden links to an example that does exactly what you are looking for. So take that for service :)
    Simeon Guest

  4. #4

    Default Re: Creating a Link in a dg

    A cell renderer may be overkill for this functionality.

    You could just use getURL().

    Tracy
    ntsiii Guest

  5. #5

    Default Re: Creating a Link in a dg

    Thanks Tracey,

    I would love to see an example of this, because I dont see how you can know
    which grid cell is being clicked and send the correct url without having a
    cellrenderer. At least not very easily.

    Do you have an example you can share?



    Simeon Guest

  6. #6

    Default Re: Creating a Link in a dg

    Something like:
    var sURL:String = event.target.selectedItem.url;
    getURL(sURL, "myWindow");

    ntsiii Guest

Similar Threads

  1. Creating a website link in XML and having AS 2.0 seeingit.
    By TheMexican67 in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: May 28th, 03:31 PM
  2. Creating a pop up window from a link
    By Jadedlusion in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 5
    Last Post: May 9th, 04:25 PM
  3. creating an email link in PDF (v7)
    By Leslie_Gaffney@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 5
    Last Post: September 7th, 04:32 PM
  4. Creating email link
    By cupcake633 in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: August 25th, 02:09 PM
  5. CSS and creating a txt link which changes colour
    By sa_designer webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 2
    Last Post: July 17th, 04:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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