• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Accessing a stored PDF via Data source App

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Accessing a stored PDF via Data source App

    I have a table that contains the location of all the saved documents(PDF's, PNG's etc.,). I have created an a data source and a widget consisting of the location column.
    I even formatted the column in the widget as below:

    if (v){
    return '<a href="' + v + ' "target=_blank">View Document</a>';
    }
    However, when i click on this i get a page load error as shown in below image. Looks like there is a default setting to be looked into?

    Is there a way to be able to prevent this?
    Attached Files

  • #2
    Does your file contain the full path to the resource? Or is it assuming to be within a particular folder?

    Comment


    • #3
      I don't think that is a complete path of the file.

      Comment


      • #4
        It looks to be just the name of the file. If they all live under the same folder, you could hard code the path in the renderer:

        Code:
        var path   = '/PATH_TO_MY_FOLDER/{0},
            markup = '<a href="{0}" "target=_blank">View Document</a>';
        if (v){
           path = Ext.String.format(path,v);
           return Ext.String.format(markup,path);
        }
        Otherwise, you will need to have the full path in each record.

        Comment


        • #5
          That helps. Thanks Sean.

          Comment

          Working...
          X