• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Links in interactive map not working

New Here ,
Jun 03, 2019 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');

});

Views

312

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
community guidelines

correct answers 1 Correct answer

Engaged , Jun 03, 2019 Jun 03, 2019

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

...

Votes

Translate

Translate
Engaged ,
Jun 03, 2019 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.

Votes

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
community guidelines
New Here ,
Jun 03, 2019 Jun 03, 2019

Copy link to clipboard

Copied

LATEST

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.

Votes

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
community guidelines