Page 1 of 2

Drag and drop script static boxesDrag and drop script static

PostPosted: Mon Mar 31, 2008 4:04 pm
by bhupsonline
Drag and drop script static boxes
you have develop fine script I just love that
I want to know about static boxes how can I pass some html content which is in string in aspx.cs file or one textbox value which is in aspx file into javascript file dragable-boxes.js
this is the following code
var htmlContentOfNewBox = '<DIV>This is a static box created from the function createDefaultBoxes().</div>'; // HTML content of new box
var titleOfNewBox = 'This is a static box';
var x1=document.createElement("div");

if(!staticObjectArray['staticObject1']){ // The box is not stored in cookie - we need to create it.
var newIndex = createABox(1,100,false,'staticObject1');

var html_doc1 = document.getElementById('dragableBoxContent' + newIndex);
document.getElementById('dragableBoxHeader_txt' + newIndex).innerHTML = titleOfNewBox;
}else{ // Box is stored in cookie - all we have to do is to move content into it.
var html_doc1 = document.getElementById('dragableBoxContent' + staticObjectArray['staticObject1']);
document.getElementById('dragableBoxHeader_txt' + staticObjectArray['staticObject1']).innerHTML = titleOfNewBox;



I just wanna add dynamic html content to static boxes