We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Rendering Javascript produces blank page!

Development and Programming

mweichert's avatar
mweichert
68 posts
16 years ago
mweichert's avatar mweichert

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

       
mweichert's avatar
mweichert
68 posts
16 years ago
mweichert's avatar mweichert

Please consider this issue resolved - there was a plugin a different plugin that was causing this plugin to fail.

Sorry for the bother.

Thanks, Mike

       
mweichert's avatar
mweichert
68 posts
16 years ago
mweichert's avatar mweichert

I lied… I’m still having the same problem.

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
16 years ago
Sue Crocker's avatar Sue Crocker

Mike, troubleshooting your plugin code is beyond the scope of Technical Support. I’m going to move this thread.

       
mweichert's avatar
mweichert
68 posts
16 years ago
mweichert's avatar mweichert

Sue,

Sorry, I’ve noticed that a couple of my threads have been moved. What is the scope of the Technical Support thread?

Thanks, Mike

       
mweichert's avatar
mweichert
68 posts
16 years ago
mweichert's avatar mweichert

Hmm, this is weird - it’s some sort of ‘limit’ that I am reaching. I was able to determine that the max length of string that I can return is 5622. So, what is this limit and how can I get around it?

Thanks, Mike

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
16 years ago
Sue Crocker's avatar Sue Crocker

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?

       
mweichert's avatar
mweichert
68 posts
16 years ago
mweichert's avatar mweichert

Has anyone ever experienced the problem above?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.