Showing posts with label tables. Show all posts
Showing posts with label tables. Show all posts

Saturday, March 24, 2012

Need code for Drag and Drop Div ...

Hello All...

i have two tables where i have 3 div in 1 one table and 3 Divs in other table.

i want that i can drag any DIV of 1st tables DIV to 2nd TABLES Div and can paste on it..

i went to several solutions but they are providing solutions for HardCord Named DIVS not for Runtime Created DIVs.

pls help me...

It shouldn't work any differently. You just need to assign IDs to the divs when you create them and then assign the behaviors to those IDs. Perhaps if you post the code you are using to create the divs as well as what solution you want to use (I personally like the prototypes at http://script.aculo.us).


Yes. Check these sample for clues

http://www.codeproject.com/aspnet/DragAndDropShopping.asp

http://elouai.com/javascript-drag-and-drop.php

HTH,
Suprotim Agarwal

--
http://www.dotnetcurry.com
--


i am basically creatingDIV dynamically through CODE and i want to paste them on each other

i am not getting any help from http://script.aculo.us site and other answers of my post forums

How can i assign values & Ids of different DIV created at runtime in my JavaScript ?? can u give me a sample code ...

Thank You


var parent = document.getElementById('parentDiv');
var newdiv = document.createElement('div');
var divID = 'myNewDiv;
newdiv.setAttribute('id',divID);
newdiv.innerHTML = 'Element has been added!';
parent.appendChild(newdiv);


http://www.dhtmlgoodies.com/index.html?page=dragDrop

Need desperate help with an ajax functionality. Deadline in two days.

Hello. I have a question regarding animationextender and tables...

if you go to...

http://doc000.emailster.com/test.aspx

And click on the button in the middle left, you will see the above image move to the left, while the table cell on the right containing the word "right" does not expand along with the moving div layer. it stays stationary. This is visible in IE, however, in FF it works ok..

I put my code below...

This is the html portion that I am testing:

<tableborder="1">

<tr>

<tdstyle="width:197px;">

<asp:PanelID="pSideMenu"Style="position:relative;"runat="server">

<imgalt="TRSh"src="/images/Create-New-Material.gif"width="197"height="47"/>

</asp:Panel></td>

<tdstyle="width:100%;">right</td>

</tr>

</table>

This is my ajax code:

<ajaxToolkit:AnimationExtenderID="AnimationExtender1"runat="server"TargetControlID="collapserClose">

<Animations>

<OnClick>

<Sequence>

<parallelDuration=".20"Fps="25">

<MoveAnimationTarget="pSideMenu"Horizontal="-180"/>

<ResizeAnimationTarget="pSideMenu"width="10px"/>

</parallel>

<StyleActionAnimationTarget="collapserClose"Attribute="display"Value="none"/>

<StyleActionAnimationTarget="collapserOpen"Attribute="display"Value="block"/>

</Sequence>

</OnClick>

</Animations>

</ajaxToolkit:AnimationExtender>

<ajaxToolkit:AnimationExtenderID="AnimationExtender2"runat="server"TargetControlID="collapserOpen">

<Animations>

<OnClick>

<Sequence>

<parallelDuration=".20"Fps="25">

<MoveAnimationTarget="pSideMenu"Horizontal="180"/>

<ResizeAnimationTarget="pSideMenu"width="197px"/>

</parallel>

<StyleActionAnimationTarget="collapserClose"Attribute="display"Value="block"/>

<StyleActionAnimationTarget="collapserOpen"Attribute="display"Value="none"/>

</Sequence>

</OnClick>

</Animations>

</ajaxToolkit:AnimationExtender>

Any help would be very much appreciated. In fact, i would be so grateful, I'm willing to put money in on this. Negotiable (message me).

I've spent around 2 days on this now. And it's eating up the work hours. So I'm fairly desperate. Thanks so much.

Sincerely,

Jeff

I tested your page with firefox and ie7, didn't see anything moving...

Maybe you need something like this:

<StyleActionAnimationTarget="[...]"Attribute="overflow"Value="hidden"/>

Except you want overflow visible? (Not sure I understood your problem though..)


Well, if you click the button. You should see something happen at the very top left corner. See it?


Why don't you use a collapsiblepanelextender instead...this has built-in animation for the collapse/expand and may resolve your problem.


Well, I did that at the beginning. But the animationextender gives much more flexibility in terms of FPS, and duration, and also, it allows me to specify how much it should be moved. I tried using the "expandedsize" and "collapsedsize" for the collapsiblepanel, but it did not work.

I'm stuck.

Help.

Thanks.