How can i add additional link to popup window in WebAppBuilder application beside "Zoom To" link?
Solved! Go to Solution.
Thank you very much for the reference;
It is working for me by adding the following code to the PopupManager.js line 91 onwords:
var link = html.create("a", {
"class": "action",
"id": "submitBidLink",
"innerHTML": "Submit Bid", //text that appears in the popup for the link
"href": "javascript: void(0);"
}, query(".actionList", this.popupUnion.bigScreen.domNode)[0]);
//when the link is clicked register a function that will run
on(link, "click", lang.hitch(this, this.redirectFunc));
//the redirection function
redirectFunc: function () {
var feature = this.mapManager.map.infoWindow.getSelectedFeature();
var fs = feature.attributes.ProjectNo;
var xCoord = feature.attributes.Latitude;
var yCoord = feature.attributes.Longitude;
window.location.href = "http://----------------------/index.html?id=" + fs+"&x="+xCoord+"&y="+yCoord;},
Here is a link where I have answered this question already:
Thank you very much for the reference;
It is working for me by adding the following code to the PopupManager.js line 91 onwords:
var link = html.create("a", {
"class": "action",
"id": "submitBidLink",
"innerHTML": "Submit Bid", //text that appears in the popup for the link
"href": "javascript: void(0);"
}, query(".actionList", this.popupUnion.bigScreen.domNode)[0]);
//when the link is clicked register a function that will run
on(link, "click", lang.hitch(this, this.redirectFunc));
//the redirection function
redirectFunc: function () {
var feature = this.mapManager.map.infoWindow.getSelectedFeature();
var fs = feature.attributes.ProjectNo;
var xCoord = feature.attributes.Latitude;
var yCoord = feature.attributes.Longitude;
window.location.href = "http://----------------------/index.html?id=" + fs+"&x="+xCoord+"&y="+yCoord;},