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 ExtensionsModulesModulesDNN popup or creating another page with details????DNN popup or creating another page with details????
Previous
 
Next
New Post
12/5/2013 8:58 AM
 

Hello Westa ,

The popups is enabled in my site Admin –> Site Settings (i don't knows what u mean by : edit the module settings to make sure that popups are enabled)

and I add the following code on my link and it's working but without popup

 protected void OnClick(object sender, EventArgs e)
        {
            var lbButton = sender as LinkButton;
            if (lbButton != null)
            {
                string jobid = lbButton.CommandArgument[0].ToString(CultureInfo.InvariantCulture);
                String myTargetURL = DotNetNuke.Common.Globals.NavigateURL(TabId, "", "jobID=" + jobid);
                String myPopupTargetURL = UrlUtils.PopUpUrl(myTargetURL, this, PortalSettings, true, false);
                // display the details panel
                PanelJobDetails.Visible = true;
                // hide the results master panel
                MasterPanel.Visible = false;
                lbButton.PostBackUrl = myTargetURL;
                lbButton.Attributes.Add("onclick", "return " + myPopupTargetURL);
            }
        } 

 can u tell me what i miss.

Regards : adam

 
New Post
12/5/2013 10:30 AM
 

The popup code has to be attached to the link tags when the page is created - not when the button is clicked. 

What it is doing is adding JAVASCRIPT code to the link itself - that will execute on the client side when the button is actually clicked on the browser - not on the server side.    By the time it gets back to the server its too late then to do anything.  

 
New Post
12/5/2013 5:00 PM
 

so what is the usage of this code : UrlUtils.PopUpUrl(myTargetURL, this, PortalSettings, true, false);

 

 
New Post
12/5/2013 5:55 PM
 
mohamed adam wrote:

so what is the usage of this code : UrlUtils.PopUpUrl(myTargetURL, this, PortalSettings, true, false);

It is building the javascript code that is to be injected into the web-browser to trigger the client side click action - which causes  a new window to open on the existing page - and a new copy of the current page to be loaded inside the popup with a special clean skin - and ONLY the one module turned on.

Basically it generates code something like this into the client side onclick.

 dnnModal.show('http://myactualsite.com/mypath/tabid/123/moduleid/123/othersetting/123/&popUp=true',/*showPopup*/true,300,650,true,'')


 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesDNN popup or creating another page with details????DNN popup or creating another page with details????


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