Help: generating a hyperlink in query result

Xiaopeng Xiong xpxiong at PURDUE.EDU
Tue Oct 10 11:23:19 PDT 2006


Jacob, thank for your reply. 
I think your method generates hyperlinks after post-processing of query result. But I wonder if it is possible to return hyperlinks to a uer directly when he/she clicks on the map. I wonder it is possible?


Thanks,
Xiaopeng


  ----- Original Message ----- 
  From: Delfos, Jacob 
  To: Xiaopeng Xiong ; MAPSERVER-USERS at LISTS.UMN.EDU 
  Sent: Tuesday, October 10, 2006 12:11 AM
  Subject: RE: [UMN_MAPSERVER-USERS] Help: generating a hyperlink in query result


  Hi Xiaopeng,

  If the attribute value is simply passed into the HTML, then it's simply a matter of putting in the right HTML code:

  <a href="http://someWebsite/myDir/1.img" target=#>Click for 1.img</a>  (the target=# makes it open in a new window)

  I normally generate a directory listing, and paste it into a spreadsheet (e.g. excel / openOffice CALC), and split up the parts of the link, then concatenate them. For example, imagine a row in a spreadsheet:

  column 1:      <a href="http://someWebsite/mydir/
  column 2:      1
  column 3:      ".img target=#>
  column 4:      click for image 
  column 5:      1
  column 6:     </a>

  column 7:     =concatenate(column1, column2, column3, column4, column6)

  Only column 2 and 5 will change (can use autonumber). All other columns will hold the same value, and can be copied across.

  Hope this makes sense.

  regards,

  Jacob




----------------------------------------------------------------------------
    From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On Behalf Of Xiaopeng Xiong
    Sent: 10 October 2006 11:42
    To: MAPSERVER-USERS at LISTS.UMN.EDU
    Subject: [UMN_MAPSERVER-USERS] Help: generating a hyperlink in query result


    I have one index on raster images and it can be displayed and queried through Mapserver.
    I wonder whether it would be possible to generate a hyperlink in query result.
    The hyperlink will be generated based on one attribute in the index. 
    For example, if the attribute value is "/home/myDir/1.img", the hyperlink will direct user to http://SomeWebsite/myDir/1.img".
    I appreciate any suggestions or ideas.

    Thank you



    Best regards,
    Xiaopeng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20061010/4ca11fd4/attachment.htm>


More information about the MapServer-users mailing list