views:

319

answers:

2

I am trying to create popup using the jqueryui dialog. I am trying to add a footer after the content in the dialog.

my dialog should look like

<popup>
 header-html
 content-html
 footer-html
</popup>

The dialog already has header and i can put content in the div. But, how can i add the footer html??

I want this footer to be there across all popups on the website.

A: 

What does your Html look like? I'd imagine something like this:

<div class="popup">
   <div class="header"></div>
   <div class="content"></div>
   <div class="footer"></div>
</div>

...and then the glib answer to your question is "the same way you put content into the header and content sections."

In JQuery it would be something like:

$(".footer").html("Hello World!");
Clever Human
actually the header div is generated by jquery. So the HTML is like <popup><content>content here <footer></footer></content></popup>.The jquery dialog only asks for id of content div(i cannot give it two div ids and say one is footer and one is content) and it wraps header around it.
Rajani Karuturi
A: 

Just separate out your current content container into a content and footer div:

<div class="dialogContent">
   <div class="content">Your existing content</div>
   <div class="footer">The common footer stuff</div>
</div>

Then put that within the content of the dialog.

Fiona Holder
one change from this is that I made all the jquery dialog calls go though a rapper function to jquery.dialog and added the footer div html to the dialogContent div inside that function.
Rajani Karuturi