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.