Re: trouble with Django and javascript

2009-02-02 Thread BluMarble
I personally feel you should look into doing the post via Ajax, pass your form field values into an array and unpack the values in your view: ie: function AjaxSubmitForm(formdata){ $.post('/ajax/some-view/'+formdata+'/', function(data){ if(data == 'done'){ d.body.innerHTML = "

Re: trouble with Django and javascript

2009-02-01 Thread Will Matos
Sent: Sun Feb 01 21:07:28 2009 Subject: Re: trouble with Django and javascript Not working. Still the same problem( when button is clicked, the text of "This is a test" will display in the iframe for one second, and then disappear.). On Feb 2, 12:55 pm, "Will Matos" wrote: >

Re: trouble with Django and javascript

2009-02-01 Thread min
Dir. of Tech. Sales > > > > - Original Message - > From: django-users@googlegroups.com > To: Django users > Sent: Sun Feb 01 20:54:32 2009 > Subject: Re: trouble with Django and javascript > > If I use Onclick="submit();", how to add the javascript fu

Re: trouble with Django and javascript

2009-02-01 Thread Will Matos
Onclick="test();submit();" Will Matos TCDI Dir. of Tech. Sales - Original Message - From: django-users@googlegroups.com To: Django users Sent: Sun Feb 01 20:54:32 2009 Subject: Re: trouble with Django and javascript If I use Onclick="submit();", how to add the

Re: trouble with Django and javascript

2009-02-01 Thread min
Greensboro, NC  27407 > 336.232.5832 office > 336.232.5850 fax > 336.414.0467 mobile   > > > > - Original Message - > From: django-users@googlegroups.com > To: Django users > Sent: Sun Feb 01 19:52:49 2009 > Subject: Re: trouble with Django and javascript

Re: trouble with Django and javascript

2009-02-01 Thread Will Matos
ubject: Re: trouble with Django and javascript Thanks for you reply. However, if I change the 'submit' to button, how can I submit the form to the server? Regards min On Feb 2, 11:34 am, "Todd O'Bryan" wrote: > In addition to displaying the message, it's also submi

Re: trouble with Django and javascript

2009-02-01 Thread min
Thanks for you reply. However, if I change the 'submit' to button, how can I submit the form to the server? Regards min On Feb 2, 11:34 am, "Todd O'Bryan" wrote: > In addition to displaying the message, it's also submitting the form, > so you see the text for a second and then the form reloads

Re: trouble with Django and javascript

2009-02-01 Thread min
Thanks for you reply. However, if I change the 'submit' to button, how can I submit the form to the server? Regards min On Feb 2, 11:34 am, "Todd O'Bryan" wrote: > In addition to displaying the message, it's also submitting the form, > so you see the text for a second and then the form reloads

Re: trouble with Django and javascript

2009-02-01 Thread min
Thanks for you reply. However, if I change the 'submit' to button, how can I submit the form to the server? Regards min On Feb 2, 11:34 am, "Todd O'Bryan" wrote: > In addition to displaying the message, it's also submitting the form, > so you see the text for a second and then the form reloads

Re: trouble with Django and javascript

2009-02-01 Thread min
Thanks for you reply. However, if I change the 'submit' to button, how can I submit the form to the server? On Feb 2, 11:34 am, "Todd O'Bryan" wrote: > In addition to displaying the message, it's also submitting the form, > so you see the text for a second and then the form reloads. > > Change

Re: trouble with Django and javascript

2009-02-01 Thread min
Thanks for you reply. However, if I change the 'submit' to button, how can I submit the form to the server? On Feb 2, 11:34 am, "Todd O'Bryan" wrote: > In addition to displaying the message, it's also submitting the form, > so you see the text for a second and then the form reloads. > > Change

Re: trouble with Django and javascript

2009-02-01 Thread Todd O'Bryan
In addition to displaying the message, it's also submitting the form, so you see the text for a second and then the form reloads. Change the instead of "submit" and see if that helps. Todd On Sun, Feb 1, 2009 at 6:05 PM, min wrote: > > First I have a form: > > class TestForm(forms.Form): >

Re: trouble with Django and javascript

2009-02-01 Thread min
Besides, I use firefox. thanks On Feb 2, 10:05 am, min wrote: > First I  have a form: > > class TestForm(forms.Form): >   name = forms.CharField( max_length=30 ) >   age = forms.CharField( max_length=30 ) > > Then in the views.py: > > def Test_page(request): > >   form = TestForm() >   variable

Re: trouble with Django and javascript

2009-02-01 Thread min
Besides, I use firefox. On Feb 2, 10:05 am, min wrote: > First I  have a form: > > class TestForm(forms.Form): >   name = forms.CharField( max_length=30 ) >   age = forms.CharField( max_length=30 ) > > Then in the views.py: > > def Test_page(request): > >   form = TestForm() >   variables = Requ

Re: trouble with Django and javascript

2009-02-01 Thread min
Besides, I use firefox. On Feb 2, 10:05 am, min wrote: > First I  have a form: > > class TestForm(forms.Form): >   name = forms.CharField( max_length=30 ) >   age = forms.CharField( max_length=30 ) > > Then in the views.py: > > def Test_page(request): > >   form = TestForm() >   variables = Requ

trouble with Django and javascript

2009-02-01 Thread min
First I have a form: class TestForm(forms.Form): name = forms.CharField( max_length=30 ) age = forms.CharField( max_length=30 ) Then in the views.py: def Test_page(request): form = TestForm() variables = RequestContext(request, { 'form': form, }) return render_to_response('Tes