Highlighted

Links in interactive map not working

New Here ,
Jun 03, 2019

Copy link to clipboard

Copied

I am trying to create an interactive map for our website to show infrastructure updates to our various locations. I have different buttons, however, I copy and pasted each button type. I have figured out how to link it but only one of each time of button works and it opens all the pages instead of just that specific facility's update page. Can someone help me???

Example of three of the facility button's code:

var _this = this;

_this.correctional.on('click', function(){

window.open('http://doc.ok.gov/bjcc-updates', '_blank');

});

var _this = this;

_this.correctional.on('click', function(){

window.open('http://doc.ok.gov/jccc-updates', '_blank');

});

var _this = this;

_this.correctional.on('click', function(){

window.open('http://doc.ok.gov/wskcc-updates', '_blank');

});

Hi,

trying changing the instances of each button to be different i.e. first button called 'correctional1', second button 'correctional2' and third button 'correctional3' like this...

var _this = this;

_this.correctional1.on('click', function(){

window.open('http://doc.ok.gov/bjcc-updates', '_blank');

});

var _this = this;

_this.correctional2.on('click', function(){

window.open('http://doc.ok.gov/jccc-updates', '_blank');

});

var _this = this;

_this.correctional3.on('click', function(){

window.open('http://doc.ok.gov/wskcc-updates', '_blank');

});

Hope I have picked you up right and this works.

TOPICS
Discussions

Views

172

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Links in interactive map not working

New Here ,
Jun 03, 2019

Copy link to clipboard

Copied

I am trying to create an interactive map for our website to show infrastructure updates to our various locations. I have different buttons, however, I copy and pasted each button type. I have figured out how to link it but only one of each time of button works and it opens all the pages instead of just that specific facility's update page. Can someone help me???

Example of three of the facility button's code:

var _this = this;

_this.correctional.on('click', function(){

window.open('http://doc.ok.gov/bjcc-updates', '_blank');

});

var _this = this;

_this.correctional.on('click', function(){

window.open('http://doc.ok.gov/jccc-updates', '_blank');

});

var _this = this;

_this.correctional.on('click', function(){

window.open('http://doc.ok.gov/wskcc-updates', '_blank');

});

Hi,

trying changing the instances of each button to be different i.e. first button called 'correctional1', second button 'correctional2' and third button 'correctional3' like this...

var _this = this;

_this.correctional1.on('click', function(){

window.open('http://doc.ok.gov/bjcc-updates', '_blank');

});

var _this = this;

_this.correctional2.on('click', function(){

window.open('http://doc.ok.gov/jccc-updates', '_blank');

});

var _this = this;

_this.correctional3.on('click', function(){

window.open('http://doc.ok.gov/wskcc-updates', '_blank');

});

Hope I have picked you up right and this works.

TOPICS
Discussions

Views

173

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 03, 2019 0
Engaged ,
Jun 03, 2019

Copy link to clipboard

Copied

Hi,

trying changing the instances of each button to be different i.e. first button called 'correctional1', second button 'correctional2' and third button 'correctional3' like this...

var _this = this;

_this.correctional1.on('click', function(){

window.open('http://doc.ok.gov/bjcc-updates', '_blank');

});

var _this = this;

_this.correctional2.on('click', function(){

window.open('http://doc.ok.gov/jccc-updates', '_blank');

});

var _this = this;

_this.correctional3.on('click', function(){

window.open('http://doc.ok.gov/wskcc-updates', '_blank');

});

Hope I have picked you up right and this works.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 03, 2019 2
kayt2185 LATEST
New Here ,
Jun 03, 2019

Copy link to clipboard

Copied

That worked!! Thank you!!! Now to just figure out how to publish it on my website. I need the source information to put in the code template. I tried cmd U in firefox but that didn't work.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 03, 2019 1