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
10/3/2011 9:30 PM
 
Vincent Nguyen
I tried your suggestions...I broke out the steps...

strRedirectURL = DotNetNuke.Common.Globals.NavigateURL(TabId, "ProviderOptions_List")
>>>> strRedirectURL = "http://localhost/TestPage/tabid/82/ct..."

strRedirectURL = UrlUtils.PopUpUrl(strRedirectURL, Me, PortalSettings, True, False)
>>>> strRedirectURL = dnnModal.show('http://localhost/TestPage/tabid/82/ctl/ProviderOptions_List/Default.aspx?popUp=true',/*showReturn*/true,550,950,true,'')

Me.cmdTrainings.Attributes.Add("onclick", "return " & strRedirectURL)
>>>>> Result: Popup appears with a blank page, nothing loads.

Wes Tatters
O...M...G... I swear I've done exactly what you wrote.  But for some reason....NOW it works.  I've been staring at this code for two days banging my head and I have no clue what I was doing differently then what you wrote, but I must have done something different otherwise it would have worked for me long ago.

Thank you for your help!!!

P.S. I have 1 final question about Popups though... Can a popup pass back data to the webpage that called it?

ie: User goes to the "Edit" page (Using the MANAGE button) which by default creates a new record for the user to work with. While populating the new record, they click a button that opens a popup which allows them to make changes to a list which is stored in the same record. (Utilizing the DualList control). When the user finishs changing the list, they click a save button which closes the popup. How, how do I get the list changed inside the popup, back into my Edit webpage so I can save it into the record... or can't I? Is there a "global" type of memory area reachable by all pages?

Forgive me if I seem ignorant about this.  I am a VB.Net programmer and have programmed in ASP but rarely.  But now we are looking to update some in-house software to ASP and I am trying to figure out how to do some of the same things that the original windows-based apps I designed can do, but in web format.

Thank you for all your help!

Ben Santiago, MCP Certified & A+ Certified
Programmer Analyst
(SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS, Cognos ReportNet)
 
New Post
10/3/2011 11:01 PM
 
When the popup returns it will cause a refresh of the current page - at whch stage you would need to reload any changes that occurred during the popup.

What you are trying to do however - would most likely be better handled using AJAX based client side popups as opposed to the DNN core orginated popup.  Have a look at the sort of things people are doing with jquery for some ideas on this.

Westa

 
New Post
10/4/2011 12:15 PM
 
Wes, one last question if you don't mind...

There is a situation where I would like to use a Popup, but using Server Redirect.  I tried the code below, but it doesn't work... can you advise?

strRedirectURL = EditUrl("ProviderOptions_List")
strRedirectURL = UrlUtils.PopUpUrl(strRedirectURL, Me, PortalSettings, False, True)
Response.Redirect(strRedirectURL)

After executing EditUrl, strRedirectURL has a value of... (Note: String below is prefixed with JavaScript and a colon)
dnnModal.show('http://localhost:1646/TestPage/tabid/82/ctl/ProviderOptions_List/mid/430/Default.aspx?popUp=true',/*showReturn*/false,550,950,true,'')

After executing UrlUtils.PopUpUrl, strRedirectURL has a value of... (Note: String below is prefixed with JavaScript and a colon)
dnnModal.show('http://localhost:1646/TestPage/tabid/82/ctl/ProviderOptions_List/mid/430/Default.aspx?popUp=true',/*showReturn*/false,550,950,true,'')&popUp=true

I tried executing Response.Redirect on both values, didn't work.  I don't know what the proper format is for a Response.Redirect Popup method.

Ben Santiago, MCP Certified & A+ Certified
Programmer Analyst
(SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS, Cognos ReportNet)
 
New Post
10/4/2011 1:00 PM
 
I found a "workaround" but I am not sure if this is acceptable or correct...

I created a method to convert the inline JavaScript code into a ScriptBlock. Then I used Me.Page.ClientScript.RegisterClientScriptBlock() to register the ScriptBlock and execute it. Seems to work... 

I'll use this method until I hear of the proper way to use the Popup as a SeverRedirect.

Ben Santiago, MCP Certified & A+ Certified
Programmer Analyst
(SQL, FoxPro, VB, VB.Net, Java, HTML, ASP, JSP, VBS, Cognos ReportNet)
 
New Post
10/4/2011 1:07 PM
 
AS far as Im aware thats about the only way it can be done with limitations of the current popup implementation.

Sadly - the popup system is up there with the poorest thought out elements of dnn 600.

It lacks a cohesive design methodology in its current form - and its lack of a state mechanism means that it does things like a page refresh when the user just wants to cancel the popup window.

That coupled with - no popup support out of the box for custom rego/login modules is a joke - and sadly dont hold your breath for any changes.

Westa
 
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