I think I encounter the same problem with this old post.
http://groups.google.com/group/jquery-ui/browse_thread/thread/2bce45d8dff703c0/ac78b7999bc75682?lnk=gst&q=google+gadget+whole+page#ac78b7999bc75682
Right now, I am implementing a project like iGoogle,
it allows user to drag-drop widgets in three-column layout, and allows
user to retrieve the last saved layout.
My current status is I can drag and drop, and can show the widget box
(just border and frame) after user login.
So what I did is to put the google gadget source into my widget box
div.
My problem is, once I insert the gadget source in to my page, google
gadget seems to take over my page.
Original layout ( only contains widget box, and title in it.)
Title
__________________________________
| | | |
| ________ | ________ | ________ |
| | | | | | | | | |
| | | | | | | | | |
| |_______ | | | _______| | |_______| |
| | ________ | ________ |
| | | | | | | |
| | | | | | | |
| | | _______| | |________| |
| | | |
After insert gadget source:
_________
| |
| |
|________|
_________
| |
| |
|________|
_________
| |
| |
|________|
_________
| |
| |
|________|
_________
| |
| |
|________|
The title and horizontal line are all disappear.
Just like the google gadget eat the whole page.
My source code is listed below:
for (var nArrIdx = 0; nArrIdx<iaWidArray.length; nArrIdx++)
{
//Create Widget ID and Box
var sColId = "#column" + iaWidArray[nArrIdx].col; //ex: #columnA..
var sWid = "#widget" + iaWidArray[nArrIdx].wid; //ex: #widget1..
$(sColId).append('<div class="widget" id="widget'
+ iaWidArray[nArrIdx].wid
+ '">');
//POST wid to get widget content
$(sWid).load('GetWidgetContent?widget=' + iaWidArray[nArrIdx].wid);
var sSelector = sWid + ".widget-controls";
$(sSelector).after('<div class="widget-title">'
+ iaWidArray[nArrIdx].wid
+ '</div>');
}
GetWigetContent is a servlet to return the gadget title and source
code from DB,
and forward "widget.jsp"(contain widget border and title) in the end.
widget.jsp includes widget_body.jsp.
widget_body.jsp is used to put gadget source.
Is there anybody has the same problem with me?
and I also upload my war file, and MySQL test data here:
http://www.4shared.com/file/97196547/94f6db94/0325demo.html
http://www.4shared.com/file/97196549/734ef693/testDB_20090406_2345.html
Thank you so much!!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---