Re: [pmapper-users] How to Hyperlink a pdf document on a search results

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] How to Hyperlink a pdf document on a search results

Solly
Hi

Can anyone assist me , I want to hyperlink a pdf documents

I have a shape-file that has 5 records(5 points),I want to attach different
reports per point.


Name
1
2
3
4
5

So that when you click "1" it opens a pdf 1 and when you click "2" it opens
pdf 2

Please help me
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
pmapper-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/pmapper-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] How to Hyperlink a pdf document on a search results

gioza
hi, probably the simplest solution is:

1) in your POINT shapefile add a field and populate it with pdf file's name (point1 ---> pdf name)

2) modify your mapfile in the part concerning the point layer in this way:


...
METADATA
 "PM_RESULT_HYPERLINK" '{ "FIELD NAME, THE ONE OF YOUR PDFs NAME": {"alias": "Link to PDF"} }'
...

3) modify your custom.js in this way:

// Sample Hyperlink function for result window
 
   openHyperlink: function(layer, fldName, fldValue) {
     
  switch(layer) {
     
      case 'POINT LAYER NAME AS DECLARE IN MAPFILE':
         
       //if (fldName == 'NAME OF PDF FIELD') {
             

      var linkUrl = 'http://www.yoursite.com/PATH WHERE YOUR PDFs ARE LOCATED/' + fldValue;
         
           window.open(linkUrl, 'wikiquery');
     
               //this.openHyperlinkDialog(linkUrl);
                //}
       
        break;

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] How to Hyperlink a pdf document on a search results

Solly
Thank you very much its working the small problem i have , these pdf are
inside localhost\pmapper\pmapper5\test1.pdf
but when I click on the link in the results window it doesnt fetch the pdf
but it tells me the file is not found

I have created a field name and named it "Name" and inside records
"http:localhost/pmapper/pmapper5/test1.pdf"

Here is the java code in custom

$.extend(PM.Custom,
{
    // Sample Hyperlink function for result window
    openHyperlink: function(layer, fldName, fldValue) {
        switch(layer) {
            case 'Jobfunds':
                //if (fldName == 'Project_na') {
                    var linkUrl = 'http:localhost/pmapper/pmapper5/' +
fldValue;
                    window.open(linkUrl, 'wikiquery');
                    //this.openHyperlinkDialog(linkUrl);
                //}
                break;

Thank you


On Sun, Nov 10, 2013 at 7:00 PM, gioza <[hidden email]> wrote:

> hi, probably the simplest solution is:
>
> 1) in your POINT shapefile add a field and populate it with pdf file's name
> (point1 ---> pdf name)
>
> 2) modify your mapfile in the part concerning the point layer in this way:
>
>
> ...
> METADATA
>  "PM_RESULT_HYPERLINK" '{ "FIELD NAME, THE ONE OF YOUR PDFs NAME":
> {"alias":
> "Link to PDF"} }'
> ...
>
> 3) modify your custom.js in this way:
>
> // Sample Hyperlink function for result window
>
>    openHyperlink: function(layer, fldName, fldValue) {
>
>   switch(layer) {
>
>       case 'POINT LAYER NAME AS DECLARE IN MAPFILE':
>
>        //if (fldName == 'NAME OF PDF FIELD') {
>
>
>       var linkUrl = 'http://www.yoursite.com/PATH WHERE YOUR PDFs ARE
> LOCATED/' + fldValue;
>
>            window.open(linkUrl, 'wikiquery');
>
>                //this.openHyperlinkDialog(linkUrl);
>                 //}
>
>         break;
>
>
>
>
>
> --
> View this message in context:
> http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Re-pmapper-users-How-to-Hyperlink-a-pdf-document-on-a-search-results-tp4025401p4025402.html
> Sent from the pmapper-users -- p.mapper users mailing list mailing list
> archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models.
> Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and
> register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> pmapper-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>



--
Best Regards

Solly Vuso
Cell:073 3068 170
Fax:086 555 1270

I may not know what tomorrow holds for me but I do know who holds ma
tomorrow.....
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
pmapper-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/pmapper-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] How to Hyperlink a pdf document on a search results

Chris forum
Hi

The value of the 'Name' record should be 'test1.pdf' only (=fldValue).

Then:

openHyperlink: function(layer, fldName, fldValue) {
        switch(layer) {

            case 'Jobfunds':
                    window.open('http:/' + '/localhost/pmapper/pmapper5/' +
fldValue);
                break;
       }
},


On Thu, Nov 14, 2013 at 6:49 PM, Solly Vuso <[hidden email]> wrote:

> Thank you very much its working the small problem i have , these pdf are
> inside localhost\pmapper\pmapper5\test1.pdf
> but when I click on the link in the results window it doesnt fetch the pdf
> but it tells me the file is not found
>
> I have created a field name and named it "Name" and inside records
> "http:localhost/pmapper/pmapper5/test1.pdf"
>
> Here is the java code in custom
>
> $.extend(PM.Custom,
> {
>     // Sample Hyperlink function for result window
>     openHyperlink: function(layer, fldName, fldValue) {
>         switch(layer) {
>             case 'Jobfunds':
>                 //if (fldName == 'Project_na') {
>                     var linkUrl = 'http:localhost/pmapper/pmapper5/' +
> fldValue;
>                     window.open(linkUrl, 'wikiquery');
>                     //this.openHyperlinkDialog(linkUrl);
>                 //}
>                 break;
>
> Thank you
>
>
> On Sun, Nov 10, 2013 at 7:00 PM, gioza <[hidden email]> wrote:
>
> > hi, probably the simplest solution is:
> >
> > 1) in your POINT shapefile add a field and populate it with pdf file's
> name
> > (point1 ---> pdf name)
> >
> > 2) modify your mapfile in the part concerning the point layer in this
> way:
> >
> >
> > ...
> > METADATA
> >  "PM_RESULT_HYPERLINK" '{ "FIELD NAME, THE ONE OF YOUR PDFs NAME":
> > {"alias":
> > "Link to PDF"} }'
> > ...
> >
> > 3) modify your custom.js in this way:
> >
> > // Sample Hyperlink function for result window
> >
> >    openHyperlink: function(layer, fldName, fldValue) {
> >
> >   switch(layer) {
> >
> >       case 'POINT LAYER NAME AS DECLARE IN MAPFILE':
> >
> >        //if (fldName == 'NAME OF PDF FIELD') {
> >
> >
> >       var linkUrl = 'http://www.yoursite.com/PATH WHERE YOUR PDFs ARE
> > LOCATED/' + fldValue;
> >
> >            window.open(linkUrl, 'wikiquery');
> >
> >                //this.openHyperlinkDialog(linkUrl);
> >                 //}
> >
> >         break;
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Re-pmapper-users-How-to-Hyperlink-a-pdf-document-on-a-search-results-tp4025401p4025402.html
> > Sent from the pmapper-users -- p.mapper users mailing list mailing list
> > archive at Nabble.com.
> >
> >
> >
> ------------------------------------------------------------------------------
> > November Webinars for C, C++, Fortran Developers
> > Accelerate application performance with scalable programming models.
> > Explore
> > techniques for threading, error checking, porting, and tuning. Get the
> most
> > from the latest Intel processors and coprocessors. See abstracts and
> > register
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> > _______________________________________________
> > pmapper-users mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/pmapper-users
> >
>
>
>
> --
> Best Regards
>
> Solly Vuso
> Cell:073 3068 170
> Fax:086 555 1270
>
> I may not know what tomorrow holds for me but I do know who holds ma
> tomorrow.....
>
> ------------------------------------------------------------------------------
> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
> Free app hosting. Or install the open source package on any LAMP server.
> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
> _______________________________________________
> pmapper-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
pmapper-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/pmapper-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] How to Hyperlink a pdf document on a search results

Solly
Thank you so much its working now


On Fri, Nov 15, 2013 at 9:59 AM, Chris forum <[hidden email]> wrote:

> Hi
>
> The value of the 'Name' record should be 'test1.pdf' only (=fldValue).
>
> Then:
>
> openHyperlink: function(layer, fldName, fldValue) {
>         switch(layer) {
>
>             case 'Jobfunds':
>                     window.open('http:/' + '/localhost/pmapper/pmapper5/'
> + fldValue);
>                 break;
>        }
> },
>
>
> On Thu, Nov 14, 2013 at 6:49 PM, Solly Vuso <[hidden email]> wrote:
>
>> Thank you very much its working the small problem i have , these pdf are
>> inside localhost\pmapper\pmapper5\test1.pdf
>> but when I click on the link in the results window it doesnt fetch the pdf
>> but it tells me the file is not found
>>
>> I have created a field name and named it "Name" and inside records
>> "http:localhost/pmapper/pmapper5/test1.pdf"
>>
>> Here is the java code in custom
>>
>> $.extend(PM.Custom,
>> {
>>     // Sample Hyperlink function for result window
>>     openHyperlink: function(layer, fldName, fldValue) {
>>         switch(layer) {
>>             case 'Jobfunds':
>>                 //if (fldName == 'Project_na') {
>>                     var linkUrl = 'http:localhost/pmapper/pmapper5/' +
>> fldValue;
>>                     window.open(linkUrl, 'wikiquery');
>>                     //this.openHyperlinkDialog(linkUrl);
>>                 //}
>>                 break;
>>
>> Thank you
>>
>>
>> On Sun, Nov 10, 2013 at 7:00 PM, gioza <[hidden email]> wrote:
>>
>> > hi, probably the simplest solution is:
>> >
>> > 1) in your POINT shapefile add a field and populate it with pdf file's
>> name
>> > (point1 ---> pdf name)
>> >
>> > 2) modify your mapfile in the part concerning the point layer in this
>> way:
>> >
>> >
>> > ...
>> > METADATA
>> >  "PM_RESULT_HYPERLINK" '{ "FIELD NAME, THE ONE OF YOUR PDFs NAME":
>> > {"alias":
>> > "Link to PDF"} }'
>> > ...
>> >
>> > 3) modify your custom.js in this way:
>> >
>> > // Sample Hyperlink function for result window
>> >
>> >    openHyperlink: function(layer, fldName, fldValue) {
>> >
>> >   switch(layer) {
>> >
>> >       case 'POINT LAYER NAME AS DECLARE IN MAPFILE':
>> >
>> >        //if (fldName == 'NAME OF PDF FIELD') {
>> >
>> >
>> >       var linkUrl = 'http://www.yoursite.com/PATH WHERE YOUR PDFs ARE
>> > LOCATED/' + fldValue;
>> >
>> >            window.open(linkUrl, 'wikiquery');
>> >
>> >                //this.openHyperlinkDialog(linkUrl);
>> >                 //}
>> >
>> >         break;
>> >
>> >
>> >
>> >
>> >
>> > --
>> > View this message in context:
>> >
>> http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Re-pmapper-users-How-to-Hyperlink-a-pdf-document-on-a-search-results-tp4025401p4025402.html
>> > Sent from the pmapper-users -- p.mapper users mailing list mailing list
>> > archive at Nabble.com.
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > November Webinars for C, C++, Fortran Developers
>> > Accelerate application performance with scalable programming models.
>> > Explore
>> > techniques for threading, error checking, porting, and tuning. Get the
>> most
>> > from the latest Intel processors and coprocessors. See abstracts and
>> > register
>> >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
>> > _______________________________________________
>> > pmapper-users mailing list
>> > [hidden email]
>> > https://lists.sourceforge.net/lists/listinfo/pmapper-users
>> >
>>
>>
>>
>> --
>> Best Regards
>>
>> Solly Vuso
>> Cell:073 3068 170
>> Fax:086 555 1270
>>
>> I may not know what tomorrow holds for me but I do know who holds ma
>> tomorrow.....
>>
>> ------------------------------------------------------------------------------
>> DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
>> OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
>> Free app hosting. Or install the open source package on any LAMP server.
>> Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
>>
>> _______________________________________________
>> pmapper-users mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>>
>
>


--
Best Regards

Solly Vuso
Cell:073 3068 170
Fax:086 555 1270

I may not know what tomorrow holds for me but I do know who holds ma
tomorrow.....
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
pmapper-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/pmapper-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] How to Hyperlink a pdf document on a search results

zaiGEO
Hello,

i didn't understand how to resolve it (pdf hyperlink):
this is my code:
**Mapfile:
METADATA
   "DESCRIPTION" "projet_agriculture"
    "RESULT_FIELDS" "CAF,MONTANT_DH,DEVISE,INTITULE,CP,FP,FP_HL,ST_YEAR,END_YEAR,ABF,DATE_ABF,ABF_HL,CAUTION_DEF,POP,SURF_HA"
    "RESULT_HEADERS" "Code_affaire,Montant_en_DH,Devise,Intitule,Chef_de_projet,Fiche_de_projet,Fiche_de_projet_hyperlien,Date_début,Date_fin,Attestation_de_bonne_fin,Date_attestation_de_bonne_fin,Attestation_de_bonne_fin_hyperlien,Caution_définitive,Population,Surface_en_Ha"
   "RESULT_HYPERLINK" "FP_HL"

**custom.js:
// Sample Hyperlink function for result window
    openHyperlink: function(layer, fldName, fldValue) {
        switch(layer) {
            case 'projet_agriculture':
                if(fldName == 'FP_HL') {
                                        window.open('http:/' + '/localhost:8182/pmapper_doc/' + fldValue);
                     
                    //this.openHyperlinkDialog(linkUrl);
                }
                break;


thank you,
it is urgent plz
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] How to Hyperlink a pdf document on a search results

zaiGEO
In reply to this post by Chris forum
Hello,

i didn't understand how to resolve it (pdf hyperlink):
this is my code:
**Mapfile:
METADATA
   "DESCRIPTION" "projet_agriculture"
    "RESULT_FIELDS" "CAF,MONTANT_DH,DEVISE,INTITULE,CP,FP,FP_HL,ST_YEAR,END_YEAR,ABF,DATE_ABF,ABF_HL,CAUTION_DEF,POP,SURF_HA"
    "RESULT_HEADERS" "Code_affaire,Montant_en_DH,Devise,Intitule,Chef_de_projet,Fiche_de_projet,Fiche_de_projet_hyperlien,Date_début,Date_fin,Attestation_de_bonne_fin,Date_attestation_de_bonne_fin,Attestation_de_bonne_fin_hyperlien,Caution_définitive,Population,Surface_en_Ha"
   "RESULT_HYPERLINK" "FP_HL"

**custom.js:
// Sample Hyperlink function for result window
    openHyperlink: function(layer, fldName, fldValue) {
        switch(layer) {
            case 'projet_agriculture':
                if(fldName == 'FP_HL') {
                                        window.open('http:/' + '/localhost:8182/pmapper_doc/' + fldValue);
                     
                    //this.openHyperlinkDialog(linkUrl);
                }
                break;


thank you,
it is urgent plz
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] How to Hyperlink a pdf document on a search results

jose mvm
Hi,

In your custom.js case:


    openHyperlink: function(layer, fldName, fldValue) {
        switch(layer) {
            case 'YOUR_LAYER_NAME':
                if(fldName == 'FP_HL') {
                                        var linkUrl = 'http:/' + '/YOUR_HOSTNAME/YOUR_FOLDER/' + fldValue + '.pdf';
                    this.openHyperlinkDialog(linkUrl);
                }

PS: populate the 'FP_HL' field with pdf file's name (without .pdf/extension file)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] How to Hyperlink a pdf document on a search results

zaiGEO
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [pmapper-users] How to Hyperlink a pdf document on a search results

zaiGEO
thank you, but it didn't show my pdf, it shows a link like: (about:blank)

i don't know why?? :/
Loading...