Select to view content in your preferred language

Help with popup and custom URL

655
1
03-08-2013 08:05 AM
TracyArchibald
Regular Contributor
I'm fairly new to the JavaScript API and I'm having problems finding the information I need about how to embed a custom URL into a popup (or similar) tool.

We have a series of pdf reports that we've created to make information printable and easier to access.  An example of this url is: 
https://lamp.countygp.ab.ca/webmap/propertyReportlinc.php?linc=0027648575&rollNo=1704600&muniID=133
Basically, these URLs contain the same link with a couple of pieces of information from the feature class.  Some also have security information that needs to be added if a user is logged in (but I can deal with that later).

We won't be able to embed this URL into the feature class because some of the data sources that we have created these reports for are 3rd party and we are not able to modify them.

Currently I've been trying the popup template tool, but I can't find documentation on how to do anything like this.  (ESRI, the JavaScript documentation needs to be searchable!!!)  So, I've got a few options:
1) find the documentation for the popup to make this happen.
2) use another tool (any suggestions/examples?)
3) find a way to modify our published service WITHOUT changing the underlaying data.
4) any other solution!

I REALLY am not tied to any single solution, we're at a very preliminary stage still.  Any ideas would be appreciated.
0 Kudos
1 Reply
TracyArchibald
Regular Contributor
For the next poor person that needs to do this, here's how...

var Layername=new esri.layers.FeatureLayer("LayerURL/MapServer/0", {  
mode: esri.layers.FeatureLayer.MODE_ONDEMAND,
infoTemplate: new esri.InfoTemplate("${GSL_UWID}","Name ${NAME} <br> LICENSE_ID ${LICENSE_ID} <br> DATE ${SPUD_DATE: DateFormat(datePattern:'MMMM d, yyyy.', selector:'date')} <br> <a href=CustomURL.php?user=userinfo&UWI=${CPA_UWI}' target='_blank'>PRINT</a>" ),      
       outFields:["*"]}
       );

Also, this sample was very helpful:
http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/widget_infowindowdates
0 Kudos