Hi Drag resize is a wonderful script.I love this.I have a problem with drag.When i apply drag to input type text.i can't type text to the field.This problem is in firefox.In ie its working perfectly fine.Can u pls help me?
2) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 203.109.--.--
Posted:
Elements that you make draggable must be able to have child DIVs inserted within them. I would suggest placing the <input> element within a DIV or similar, and making that draggable, that should work a lot better!
Good luck - Angus.
3) sajanGroup: Guests IP: 122.171.--.--
Posted:
Hi angus actually this is my code . <div class="drsElement1" style="left: 210px; top: 100px;width: 250px; height: 20px;"><input type="text" id="txtbox" value="Write Here" size="79" maxlength="50" style="border:none" readonly onClick="selectArea()" onblur="deselectArea()" /></div> But again i like to say its working in explorer not in firefox.Is it a firefox bug? thanks
4) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
It should work OK in Firefox. Do you have a link to your whole implementation?
</script> <link rel="stylesheet" type="text/css" href="css/ima.css" /> </head> <body oncontextmenu="return false;"> <table width="100%"><tr><td align="center"> </td></tr></table> <div class="drsElement1" style="left: 210px; top: 100px;width: 250px; height: 20px;"><input type="text" id="txtbox" value="Write Here" size="79" maxlength="50" style="border:none" readonly onClick="selectArea()" onblur="deselectArea()" /></div> <script language="javascript"> function selectArea(txtbox){ $(txtbox).readOnly=false; $(txtbox).style.border='1px solid #AEFFAE'; } function deselectArea(txtbox){ alert('dselect'); $(txtbox).readOnly=true; $(txtbox).style.border='none'; } </script> </body> </html> ///////////////////////////// Also the resize handle at the bottom middle is not working. thanks
7) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
1) Use onfocus/onblur or just CSS pseudoclasses perhaps? 2) You need to actually pass a txtbox param, try selectbox(this) or similar.
I just added an <input> to the demo and it worked just fine, so it's not a script problem!
- Angus.
8) sajanGroup: Guests IP: 122.167.--.--
Posted:
Can u explain pls?.(Can u move and edit in firefox now?).Can u pls show me the working code?. thanks
9) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 202.137.--.--
Posted:
I took the example script, straight out of the zipfile, and put <input type="text" /> in place of the text within a DIV. That's all. Worked fine, FF v2.0.0.11.
- Angus.
10) sajanGroup: Guests IP: 121.247.--.--
Posted:
Well there may be some mistakes on my part.Anyway this script is a wonderful thing.I request you to upgrade it to more powerful. thanks
11) sajanGroup: Guests IP: 122.167.--.--
Posted:
Ya here is the problem Pls check this <div class="drsElement" style="left: 210px; top: 100px; width: 150px; height: 120px; background: #FDC; text-align: center"> <div class="drsMoveHandle"><input type="text" id="txtbox" value="Write Here" size="79" maxlength="50" style="border:none" /></div> </div> if u put text in the drsMoveHandle u can't edit text(in ff).if u put inside div with class drsElement but outside drsMoveHandle u can edit. But i want move and edit.Do u have any idea?
12) Angus TurnbullGroup: Moderators Posts: 4235Joined: 7 Dec 2003Location: New ZealandIP: 203.173.--.--
Posted:
Oh, I wasn't putting text inside the move handle! That could well cause problems as the script does cancel mousedown/focus events to avoid selecting document text as you drag.
Probably just put the <INPUT> element after drsMoveHandle? You can always use STYLE="margin-top: -20px" to move it back up...
- Angus.
13) sajanGroup: Guests IP: 122.167.--.--
Posted:
But somehow its working in IE.Thanks for your prompt reply. Best of luck.