-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I think you must have missed the docs for the $.ajax constructor. Looks in the docs for the correct way to use it... ;-) Hope this helps, Etienne Dave Maharaj :: WidePixels.com wrote: > I am trying to toggle two different views on the page. I have the users > personal info in <div id="edit_personal">content</> > > So when the user clicks edit the content gets replaced with a form url: > "/manage/personal/edit", > > What would be the best way to do this/ So if they click edit the content > gets replaced with the form, if they hit cancel the form gets replaces with > the original content? > > <script type= "text/javascript"> > $(document).ready(function(){ > $("#edit_personal").click(function(){ > $("#edit_personal").toggle().ajax(function(){ > url: "/manage/personal/edit", > cache: false > }); > return false; > }); > }); > </script> > > > Thanks, > > Dave > - -- Etienne Robillard <robillard.etie...@gmail.com> Green Tea Hackers Club <http://gthc.org/> Blog: <http://gthc.org/blog/> PGP Fingerprint: 178A BF04 23F0 2BF5 535D 4A57 FD53 FD31 98DC 4E57 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkreFvMACgkQ/VP9MZjcTlerTACgsNb4UsesKIbbJddNIIUDPsY6 JLQAn2/RLZBAHx/jbgiKnrnTHNNoNXtu =oRtu -----END PGP SIGNATURE-----