Jan K. van Dalen
|
| Posted: 08/13/2001, 9:00 PM |
|
Hi Everyone,
My goal is to have a grid with an Icon on every row. That icon will be a
dynamic URL (per record) which is a pdf document that has as a name the
formatted id of the table being displayed. IOW, record 1 in the grid will
have an id of 4567. The PDF file name that I want to load when the icon is
press is "00004567.pdf" and is located in a virtual directory on my IIS
called "Documents".
I was able to create the Icon on every row that has a static URL, now I need
to complete the cycle. I added:
fldicon = "<a href=http://www.codecharge.com><img border=0
src=openfold.gif width=30 height=30></a>"
in the Before Show event in the Grid form.
Not knowing HTML to much and even less of ASP (although learning in a
hurry<g>) I'm guessing that the code to extract the ID (which is being
displayed in the Grid) and formatted should be done in ASP.
Any help will be highly appreciated.
|
|
|
 |
Alistair McFadyen
|
| Posted: 08/14/2001, 3:20 AM |
|
Jan
As you already know the id of the record you are working on, you can use
this to define the document you want to link to:
docname = "0000" & CStr(fldID) & ".pdf"
where fldID is the primary key of your record.
Then construct your document variable:
fldicon = "<a href='http://www.codecharge.com/pathtodoc/" & docname &
"'><img border=0
> src=openfold.gif width=30 height=30></a>"
Hope this helps
Alistair McFadyen
"Jan K. van Dalen" <vandalen@mindspring.com> wrote in message
news:9la7p4$b30$1@news.codecharge.com...
> Hi Everyone,
>
> My goal is to have a grid with an Icon on every row. That icon will be a
> dynamic URL (per record) which is a pdf document that has as a name the
> formatted id of the table being displayed. IOW, record 1 in the grid will
> have an id of 4567. The PDF file name that I want to load when the icon
is
> press is "00004567.pdf" and is located in a virtual directory on my IIS
> called "Documents".
>
> I was able to create the Icon on every row that has a static URL, now I
need
> to complete the cycle. I added:
>
> fldicon = "<a href=http://www.codecharge.com><img border=0
> src=openfold.gif width=30 height=30></a>"
>
> in the Before Show event in the Grid form.
>
> Not knowing HTML to much and even less of ASP (although learning in a
> hurry<g>) I'm guessing that the code to extract the ID (which is being
> displayed in the Grid) and formatted should be done in ASP.
>
> Any help will be highly appreciated.
>
>
>
>
>
|
|
|
 |
|