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 Community Exchange, where community members ask and answer questions about DNN. To get started, just start typing your question below and either select one of the suggested questions or ask a new question of your own.

dnnModal Title

Return to previous page

  • 8/8/2013
  • 6030 Views

Question:

Jay Royall long time ago
Hi,

I am a new-comer to DNN module development so please excuse me if I don't word this question very well.

I need to develop a module that simply allows the user to fill in a form and submit it. I would like the form to be in a modal popup window. I have found examples of how to use dnnModal.Show() which works fine except for the title bar which displays the path from the root to the module being viewed.

Is there a way to change/hide this title? If not, what other alternatives are there for showing a user-control in a modal popup window? Ajax toolkit perhaps?

Thanks in advance.

Jay

Top Answer:

Joe Brinkman long time ago
Just set the title option on the underlying jQuery dialog like this:

jQuery("#iPopUp").dialog("option", {title: "Help Me!"});

iPopUp is the id that we use for the modal popup on the page, so it is easy to find.
Jay Royall long time ago
Thanks for the reply :)

I have tried what you suggested and for a second it works, however, once the popup has finished loading the title that I have specified is replaced by the path!

Any ideas?

Jay
Andrew Walker long time ago
can you post the code you have? Maybe there's an unmatched quote or apostrophe?
Jay Royall long time ago
Sure:


$(document).ready(function () {
$("#lnkPopup").click(function () {
dnnModal.show('Default.aspx?popUp=true', false, 550, 950, false);
$("#iPopUp").dialog("option", { title: 'Event Registration' });
});
});



Like I said, the popup's title is set to 'Event Registration' for a second or two but when its finished loading it changes back to the path.

Thanks for you help.

Jay
Ronald Anderson long time ago
I have the same need. Just where does the code go? In the module, do you register it on the module load event. I'm not clear no where to code goes...can you be a little more explicit?
Anonymous
Add an Answer
  • Page 1 of 2
  • 1
  • 2
10 Answers
Sign In to Participate
Or register to become a member