Hello,
I have a plugin that I use with my SAEFs to display country and province drop-down lists. I output Javascript that changes the options for the province list to suit the selected country.
I have a head_js() function that outputs the following:
< script type='text/javascript'> #deliberate space to submit this forum post
var country_info = new Array();
country_info['AF'] = {'Other': 'Other'};
country_info['AX'] = {'Other': 'Other'};
country_info['AL'] = {'Other': 'Other'};
country_info['DZ'] = {'Other': 'Other'};
country_info['AS'] = {'Other': 'Other'};
country_info['AD'] = {'Other': 'Other'};
country_info['AO'] = {'Other': 'Other'};
...
country_info['CA'] = {'AB': "Alberta",'BC': "British Columbia",'MB': "Manitoba",'NB': "New Brunswick",'NL': "Newfoundland and Labrador",'NT': "Northwest Territories",'NS': "Nova Scotia",'NU': "Nunavut",'ON': "Ontario",'PE': "Prince Edward Island",'QC': "Quebec",'SK': "Saskatchewan",'YT': "Yukon"};
country_info['CV'] = {'Other': 'Other'};
country_info['KY'] = {'Other': 'Other'};
When I use my plugin in a template I get a “blank” page (with error reportingand template debugging enabled). I can see that my plugin is returning the correct data because if I use the following I get the output that I posted above:
function head_js()
{
# logic to assemble JS
...
# return $retval;
die($retval);
}
Any help would be MUCH appreciated.
Thanks! Mike
Moved to Plugins: Technical Assistance by Moderator
Technical support is for support of the basic EE product, and first party plugins, modules, and extensions.
Questions of a “how do I do something” usually belong in the HowTo forum, if you’re looking for a step by step way of doing things. That’s a gray area. Many times those kinds of questions are OK to keep in the Technical Support arena.
If you have questions on how to create/modify plugins, extensions and modules, each of those addons to EE have their own places to post.
The development team and third party developers can assist in those forums.
Does that help?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.