Hyperlinks in Popup Template JS API 4.8

829
1
08-09-2018 11:44 AM
BulbulMajumder1
New Contributor III

How to use the hyperlinks in the popup window ? 

{
fieldName: "Report",
label: "Report",
Link :"href='http://data.mbmg.mtech.edu/proppant/Report.asp?SampleId=${SampleId}&reqby=M&'",
visible: true
}

I was using in this way . But it does not work.

0 Kudos
1 Reply
BulbulMajumder1
New Contributor III

Now it works in this way. Thanks for @Kelly Making Popups video demonstration.I solved it.

var template = { // autocasts as new PopupTemplate()
title: "SNaP Record {SampleId}",
content: "<table>" + "<tr valign='top'><td style='white-space:nowrap;'>Sample Name</td><td>{SampleName}</td></tr>" +
"<tr><td style='white-space:nowrap;'>Report</td><td><a target='_newwellwin' href='http://data.mbmg.mtech.edu/proppant/Report.asp?SampleId=${SampleId}&reqby=M&'>View</a></td></tr>" +
"<tr><td style='white-space:nowrap;'>Elevation</td><td style='white-space:nowrap;'>{Elevation}</td></tr>" +
"<tr><td style='white-space:nowrap;'>Location</td><td style='white-space:nowrap;'>{Township} {Range} {Section} {QSection}</td></tr>" +
"<tr><td style='white-space:nowrap;'>Lat/Long</td><td>{Latitude}, {Longitude}</td></tr>" +
"<tr><td style='white-space:nowrap;'>Sampled?</td><td>{SampleTaken}</td></tr>" +
"<tr><td style='white-space:nowrap;'>Sample Date</td><td>{SampleDate}</td></tr>" +
"</table>"
};

Regards
Bulbul

0 Kudos