Wednesday, March 21, 2012

problem migrate from atlas to ajax

Hi,

I have the folloving problem.

I' ve downloaded sample drag and drop apllication from codeproject.com (http://www.codeproject.com/Ajax/AtlasDragNDrop.asp) and I need to migrate it from atlas to new ajax v1.0beta.

Problem is I didn't find many sample apllictacion in new Ajax and i have problem to rewrite javascript code:

for example:

orginal:

function addFloatingBehavior(ctrl){
var floatingBehavior = new Custom.UI.FloatingBehavior();
floatingBehavior.set_handle(ctrl);
var dragItem = new Sys.UI.Control(ctrl);
dragItem.get_behaviors().add(floatingBehavior);
floatingBehavior.initialize();
}

my try:

function addFloatingBehavior(ctrl){
var floatingBehavior = $create(AjaxControlToolkit.FloatingBehavior,{'handle' : ctrl}, ctrl );
floatingBehavior.initialize();

}

it doesnt work

next scriptmanager in atlas has something like
<atlas:ScriptReference ScriptName="AtlasUIDragDrop" />

in ajax i cann't find replacement

In simple, my problem is add a floatingbehavior to DIV

(DragPanelExtender is not a solution for me)

Thanx for help

Any suggestion?

Please can anybody help me to write simple page with one button. If i click this button - new element (div) is added to page, and this div have to have floatingbehaior.

If I click button again, next div is created and so on...

It have to be in ajax v1.0 beta ...

If you want to see the same apllication in atlas please look at :http://www.codeproject.com/Ajax/AtlasDragNDrop.asp

It′s very urgent. Please help

Thanks Mayo.


I don't have a full answer, but I can tell you the drag and drop I believe is now in the CTP PreviewDragDrop.js file. with the floating behavior being Sys.Preview.UI.FloatingBehavior.

No comments:

Post a Comment