Kamal,

I do this via the jQueryUI "dialog" widget.  Works fine with Django
or any other back end code.  Just make an Ajax call to the URL
to get the HTML, instead of passing the URL to window.open(),
and pass the HTML to the jQuery dialog widget.

See:  http://jqueryui.com/dialog/

--Fred
------------------------------------------------------------------------
Fred Stluka -- mailto:f...@bristle.com -- http://bristle.com/~fred/
Bristle Software, Inc -- http://bristle.com -- Glad to be of service!
Open Source: Without walls and fences, we need no Windows or Gates.
------------------------------------------------------------------------
On 9/21/14 5:16 AM, Kamal Kaur wrote:
I'm trying to open a Django template using JS as a popup. Actually
I've done this. But it opens a separate window but I want a clean
dialog box or simply a division instead of that window.

Using window.open method, clicking on the "Advance", "popitup"
function runs. Here's the code:
http://pastie.org/9580729

The popitup function takes the passed url and opens a window
containing template sent by the view. But how to open a dialog box
instead?

I've tried using AJAX, like told in the link below but yet unable to do:
http://stackoverflow.com/questions/19267531/how-to-open-jquery-ui-dialog-with-ajax-request



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5420958B.3090905%40bristle.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to