Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Adding data elements to msbox.js via mboxParameters() function

Avatar

Avatar
Validate 1
Level 1
dean_liscum
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
dean_liscum
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
dean_liscum
Level 1

15-10-2015

I want to load some data elements into my mbox.js so that I can access them from every mbox. 

The satellite calls are
'pageName='+_satellite.getDataElement('PageName')

'formType='+_satellite.getDataElement('FormType')

The interface doesn't provide a syntax for multiple parameters.

[img]mbox_js_edit_interface.JPG[/img]

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Affirm 1
Level 1
eric_allen1
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
View profile

Avatar
Affirm 1
Level 1
eric_allen1
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

1 solution
Top badges earned
Affirm 1
View profile
eric_allen1
Level 1

15-10-2015

Hi Dean,

The way to pass in multiple key/value pairs is to separate them with an & symbol. 

So yours would be 

return 'pageName='+_satellite.getDataElement('PageName') + '&' + 'formType='+_satellite.getDataElement('FormType');

The best way to test this would be to add this code to your mbox.js file then download the newly created file and use an override in a tool like Charles with MapLocal to make sure your parameters are coming in as you expected.

Hope that helps.

Eric

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 1
dean_liscum
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
dean_liscum
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
dean_liscum
Level 1

15-10-2015

Any guess? I'm fine with adding it through the interface or directly into the javascript.