Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ..."Invalid JSON primitive: .""Invalid JSON primitive: ."
Previous
 
Next
New Post
5/30/2009 5:17 AM
 

 HI all,

 

Well, spent a good Fri evening creating a module (ascx) that shows a map (thanks to google maps api using some javascript), but every time I try to use the following code:

 

<script type="text/javascript">

     //call after page loaded

     window.onload = initialize 

</script>

 

I get a nice error from DNN on the page: visibility.ascx.vb  It blows in the page_prerender on the following line:

 DotNetNuke.UI.Utilities.DNNClientAPI.EnableMinMax(cmdVisibility, ModuleContent, ModuleControl.ModuleContext.ModuleId, ModuleControl.ModuleContext.Configuration.Visibility = Entities.Modules.VisibilityState.Minimized, MinIconLoc, MaxIconLoc, Utilities.DNNClientAPI.MinMaxPersistanceType.Cookie, Me.AnimationFrames)

 

Again, it seems to blow because of that javascript code:

  window.onload = initialize    ......and even when I commented out all the code in the funtion initialize(), it still threw the error.  Of course, when I commented out   window.onload = initialize, it didn't blow up.  

If you're curious as to the what I'm trying to do, I have a couple of list box controls on the page that consist of locations.  When a user selects a location in the control, it autoposts back, and when the page loads, I need to call that javascript funtion to load the map from google mapping api.

 

 

 

 
New Post
5/30/2009 11:16 AM
 

Here's something interesting:  if I run this page after logging in as "Admin", it works!   But if I run the page without logging in, it fails.

Well, this is weired, I really want to love DNN, but what the.  Is this an error in DNN?  Can anyone run  "window.onload = <function name>" in a ascx module in their environmnt successfully?

 
New Post
5/30/2009 1:59 PM
 

Hmm I don't have the answer but I do have code for a DNN Module that uses the Google map API: Store Locator

I am injecting the JavaScript using a ASP.NET "Literal" control so perhaps that is why my version is working. Anyway, perhaps it can help.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ..."Invalid JSON primitive: .""Invalid JSON primitive: ."


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out