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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUsing Popup To Show A CustomPage...Using Popup To Show A CustomPage...
Previous
 
Next
New Post
4/10/2012 4:48 PM
 
Hi all... I'm trying to get my popup working. I've got a custom module that I created and provided a controlKey for. I've used the technique mentioned above, but the popup displays with no content. When I navigate to the URL directly from the address bar, it doesn't seem to be loading the module (didn't initiate the module class when set a breakpoint in debugger). Any help appreciated. I've the portion of my .dnn below and the portion of code meant to generate the hyperlink to launch the popup. Thanks in advance!

Manifest (.dnn)



FTS-RSS
FTS




FTS-RSS
0


FTS-RSS
DesktopModules/FTS/FTS_RSS.ascx
False
City/State/product context RSS feed
View


0



Code in Page_Init

string strRedirectURL = EditUrl("FTS-RSS");

popupPage.NavigateUrl = strRedirectURL;

int popupHeight = 500;
int popupWidth = 900;

if ((PortalSettings.EnablePopUps ))
{
popupPage.Attributes.Add("onclick", "return " + UrlUtils.PopUpUrl(popupPage.NavigateUrl, this, PortalSettings, true, false, popupHeight, popupWidth));

}


Resulting URL:
http://dnndev/CustomPage1/CustomChildPage1/tabid/90/ctl/FTS-RSS/mid/503/Default.aspx?popUp=true


Does the module that I want to display in the PopUp have to actually be on the page that the hyperlink is that will launch the popup?

Thanks again,
Mike
 
New Post
4/10/2012 8:35 PM
 

Looks like my manifest file didn't display correctly... let's try again.


<component type="Module">


          <desktopModule>
            <moduleName>FTS-RSS</moduleName>
            <foldername>FTS</foldername>
            <businessControllerClass />
            <supportedFeatures />
            <moduleDefinitions>
              <moduleDefinition>
                <friendlyName>FTS-RSS</friendlyName>
                <defaultCacheTime>0</defaultCacheTime>
                <moduleControls>
                  <moduleControl>
                    <controlKey>FTS-RSS</controlKey>
                    <controlSrc>DesktopModules/FTS/FTS_RSS.ascx</controlSrc>
                    <supportsPartialRendering>False</supportsPartialRendering>
                    <controlTitle>City/State/product context RSS feed</controlTitle>
                    <controlType>View</controlType>
                    <iconFile />
                    <helpUrl />
                    <viewOrder>0</viewOrder>
                  </moduleControl>

 
New Post
4/11/2012 8:22 AM
 

Mike,

First I need to ask, are you testing your code by installing a compiled package, or are you testing your code directly from your source? If directly from your source, did you manually add the ModuleControl to your ModuleDefinition section (HOST>Extentions>[ Edit Your Module]>Module Definitions>Add Module Control).

Additionally I see you missed a property inside your DNN Manifest file: <supportsPopUps>True</supportsPopUps>
Without this property, your page will never "PopUp".


Ben Santiago, MCP Certified & A+ Certified
Programmer Analyst
(SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS, Cognos ReportNet)
 
New Post
4/11/2012 12:53 PM
 
I have tested my code in both cases (both installing a compiled package and by running from VS in debug mode). Same result in both cases. When installing, I added my control through the Install Extension Wizard.

As for the element. As I understand it, that is an optional element. My site already has popups that work properly. In fact, the implementation I'm working on now actually pops up the window with no problem. It just seems to be that the EditURL() call is not generating a valid url to my control.

Does the module that I want to display in the PopUp have to actually be on the page that the hyperlink is that will launch the popup?
 
New Post
4/11/2012 1:35 PM
 

Mike,

That didn't answer my question. But let me first address your new post.

Regarding the "element" in the DNN Manifest, you understand incorrectly. Just because your site has other popups that work means nothing at all. It just means that your DNN Instance is set to allow them, that is all.  Like I previously stated in my post:
You missed a property inside your DNN Manifest file: <supportsPopUps>True</supportsPopUps>
Without this property, your page will never "PopUp" [correctly, if at all].
If you do not "define" your ControlPage as "Supporting Popup", then it will not Popup correctly (if at all) because according to what DNN knows, this particular page is not a "Popup" page. Once defined at a "Supports Popup" page, then the EditURL() command will automatically return a URL formatted with the JavaScript that will "popup" your page. On a side note, I've always called the popup from server-side code, which means I needed to register a JavaScriptBlock to activate the "popup". You are trying to embed your code directly using JavaScript from what I can gather of your posts, although theoretically it shouldn't be a problem, I I have never done it that way.

Now, running from an "Installed Package" and running directly from your "Source Code" is different. In either case, you have to make sure your DNN Manifest is correct as I stated above. However, if you are running from "Source Code" and you have already initially added the Module, you need to EDIT the module definition as I explained in my previous post...add the new ControlPage you created because you added it after-the-fact and the DNN Instance has no knowledge of it, and be sure to activate the "Supports Popup" flag on the ControlPage in the Module Definition, otherwise as stated before it will not "popup" correctly if at all.

Lastly, as for your question "Does the module that I want to display in the PopUp have to actually be on the page that the hyperlink is that will launch the popup?"... I have no clue what you mean by this. When you are coding a Module, ALL your ControlPages are within the Module you are coding. If you are referring to accessing a completely separate Module, then you need to know that you cannot access ControlPages of other Modules.  EditURL() and NavigateURL() does not support cross-module communication. Now the caveat to this statement is that if you want, you "could" create Direct SQL Queries against the DNN Core Tables to determine the ModuleID of another Module and then manually build a URL to which you can use in a ResponseRedirect() command. As for the SQL statements needed, only you can figure that out as these are your modules.


Ben Santiago, MCP Certified & A+ Certified
Programmer Analyst
(SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS, Cognos ReportNet)
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesUsing Popup To Show A CustomPage...Using Popup To Show A CustomPage...


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