ct2k7
07-21-2009, 05:29 PM
Hello,
I am attempting to build a portal, located here:
http://thinkteen.co.uk/portal
Currently, the portlets are hard coded into the portal page as can bee seen via the source.
What I need to be able to do is to:
User able to move portlets (achieved)
New portlet position to be saved
So, basically, I have though about making an AJAX request to POST to a PHP file on the server which saves the new position in the MySQL backend.
IE:
On widget drop ajax POST to /widget.php with position info(maybe container name + item index) ('leftBar',3), maybe account # that is specific to user, as well as the identifier for the module -->
$.post("widget.php", { module: "myInfoModule", container: 'leftBar'},"json");
Would that be correct?
in widget.php, it writes to the database the new position of the widget/portlet.
Now here's the other thing I need to achieve; to be able to read the modules and position from database, and place them in their respective places.
I am not entirely sure what to do here.
Thanks :)
I am attempting to build a portal, located here:
http://thinkteen.co.uk/portal
Currently, the portlets are hard coded into the portal page as can bee seen via the source.
What I need to be able to do is to:
User able to move portlets (achieved)
New portlet position to be saved
So, basically, I have though about making an AJAX request to POST to a PHP file on the server which saves the new position in the MySQL backend.
IE:
On widget drop ajax POST to /widget.php with position info(maybe container name + item index) ('leftBar',3), maybe account # that is specific to user, as well as the identifier for the module -->
$.post("widget.php", { module: "myInfoModule", container: 'leftBar'},"json");
Would that be correct?
in widget.php, it writes to the database the new position of the widget/portlet.
Now here's the other thing I need to achieve; to be able to read the modules and position from database, and place them in their respective places.
I am not entirely sure what to do here.
Thanks :)