This project is read-only.

Widget drag and drop

Topics: Controls
Apr 17, 2009 at 2:08 AM
I'm creating a site with a widget zone.  Can anyone explain to me how the widgets are disallowed to drag and drop when user is not logged in?  My app allows drag and drop regardless of the login status.  Thanks in advance.
Apr 17, 2009 at 2:25 AM
It isn't that the widgets are disallowed to be dragged-and-dropped when not logged in, but the opposite ... when logged in, the widgets are made drag-and-droppable.

When logged in as an administrator, a <script> tag for the widget.js file in the 'admin' folder is sent to the browser.  When widget.js is loaded in the browser, it makes the widgets drag-and-droppable.

Depending on your settings, the <script> tag for widget.js will either have a SRC directly to /admin/widget.js, or it might go through the js.axd handler.

If you're not logged into the blog as an administrator, the <script> tag for widget.js shouldn't be sent to the browser.  If you just logged out and can still drag-and-drop the widgets, you could try doing a no-cache refresh (Ctrl-F5) to make sure you're not working with a cached copy of the page in your browser.
Apr 17, 2009 at 7:31 AM
Thank you very much for your answer.  I admire your technical expertise.