Once I remove the existing comment lines within the example that is included with the config script, the page including the disclaimer doesn't load.
declineHref: 'http://esri.com',
Can you explain why this may not be working?
Once I remove the existing comment lines within the example that is included with the config script, the page including the disclaimer doesn't load.
declineHref: 'http://esri.com',
Can you explain why this may not be working?
Sounds like you maybe missing a comma or possible have an extra comma in the configuration of the disclaimer widget. Look for those. Use the structure of the configuration for the other widgets in your app as an example.
If you need further assistance, please post all the lines for configuration object for that widget so I can provide a more pinpointed answer.
EDITED ANSWER AFTER RECEIVING WIDGET CONFIG VIA E-MAIL.
Here is the widget config that was received:
disclaimer: {
include: true,
id: 'disclaimer',
type: 'floating',
path: 'gis/dijit/Disclaimer',
title: 'Terms of Agreement',
options: {
// you can customize the button text
i18n: {
accept: 'Agree',
decline: 'Decline'
},
// pre-define the height so the dialog is centered properly
style: 'height:295px;width:375px;',
// you can put your content right in the config
content: '<div align="center" style="background-color:white;color:black;font-size:18px;padding:25px;”>Blah Blah Blah...<br/><img src="http://fc06.deviantart.net/fs5/i/2004/313/2/5/Captain_Jolly_Roger_by_ramiusraven.jpg" style="width:160px;margin-top:25px;" /></div>'
// or you can provide the url for another page that includes the content
//href: './disclaimer.html',
// the url to go to if the user declines.
declineHref: 'http://www.googlei.com/',
}
},
As I suspected, you were missing a comma at the end of the line for the contents
property.
I also removed the additional comma at the end of the line for the declineHref
property. An extra comma in the last property of a JSON object would foul up older versions of internet explorer where other browsers are more forgiving. If this is the last widget in your configuration file, you should also remove the comma at the end of the last line of this widget config for the same reason.
Here is the corrected config:
disclaimer: {
include: true,
id: 'disclaimer',
type: 'floating',
path: 'gis/dijit/Disclaimer',
title: 'Terms of Agreement',
options: {
// you can customize the button text
i18n: {
accept: 'Agree',
decline: 'Decline'
},
// pre-define the height so the dialog is centered properly
style: 'height:295px;width:375px;',
// you can put your content right in the config
content: '<div align="center" style="background-color:white;color:black;font-size:18px;padding:25px;”>Blah Blah Blah...<br/><img src="http://fc06.deviantart.net/fs5/i/2004/313/2/5/Captain_Jolly_Roger_by_ramiusraven.jpg" style="width:160px;margin-top:25px;" /></div>',
// or you can provide the url for another page that includes the content
//href: './disclaimer.html',
// the url to go to if the user declines.
declineHref: 'http://www.googlei.com/'
}
},
One final note: You may want to replace the pirate flag image with your own text. That was in the disclaimer example just for fun ;)