473,386 Members | 1,706 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

input field in movable div looses select behaviour

21
Hi I've started to create movable divs with forms in them. When your grab
the div you can move it. The bad thing is that you actually can move the form when having the cursor in the one of the input fields. To remove this behaviour I remove the event listener that is attached to the div.
The problem then is that I loose the normal input functionality for selecting text.

Anybody knows how to solve this problem?

Expand|Select|Wrap|Line Numbers
  1. <div id="searchdiv" style="visibility: hidden; left: 200px; top: 200px; position: absolute; width: 600px; border: thin solid black;
  2.      background-color: #CCCC99; layer-background-color: #CCCC99;"  onmousedown="dragStart(event, 'searchdiv')">
  3.      <div id="windowclose" align="right">
  4.      <img src="close.gif" width="30" height="30" onclick="hs();return false;" onmouseover="rMListeners();" onmousedown="rMListeners();" onmousemove="rMListeners();" onmouseout="rMListeners();"/>
  5. </div>
  6.      <div id="mb"></div>
  7.      <div id="rb"></div>
  8.      <div id="sc">
  9. <form id="sform" name="sform" method="post" action="">
  10.   <table width="439" border="0">
  11.     <tr>
  12.       <td></td>
  13.       <td></td>
  14.       <td></td>
  15.       <td>Zip</td>
  16.       <td><input id="zip" name="zip" type="text" autocomplete="off" size="7" maxlength="6" onmouseover="rMListeners();" onmousedown="rMListenerfromObj(this);this.focus();" onmousemove="rMListeners();" onmouseout="rMListenerfromObj(this);" 
  17.     </tr>
  18.   </table>
  19. </form>
  20. </div>
  21.  
Apr 26 '07 #1
1 1897
acoder
16,027 Expert Mod 8TB
This link might help. Stop the propagation of the events.
Jan 30 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: sean | last post by:
I'm having problems trying to sort a series of authors who post online using Movable Type. I've tried posting my problem to the Movable Type support group, but no one has even answered my question....
0
by: Fuzzyman | last post by:
Movable Python has just been released on sourceforge. Movable Python is a frozen distribution of Python. It will run python scripts without needing to be installed. ...
4
by: kaeli | last post by:
Hi all, I have form elements that I want to not be editable. They should, however, be passed on submission. AFAIK, then, they need to be readonly. (intranet app where elments are created...
5
by: Raffi | last post by:
Hi folks, I'm new to JavaScript and need some help. I have a form with a select field. Depending on what is selected in this field, I want to display or not display another select field. For...
3
by: MarsVoyager | last post by:
Hi, I want to change the value of a submit button when the onChange event is fired by a Radio Input. Problem is, it seems the value is modified in the gui only when the Radio Input looses focus,...
0
by: Fuzzyman | last post by:
It's finally happened, `Movable Python <http://www.voidspace.org.uk/python/movpy/>`_ is finally released. Versions for Python 2.3 & 2.4 are available from `The Movable Python Shop...
1
by: Rancid Buttchutney | last post by:
I've tried searching the web but I've had little success finding a cross-browser(IE, Firefox and Opera anyway) implementation of a restricted text INPUT that works in realtime before a character...
8
by: Sid666 | last post by:
Hi, everyone I'm building an Access DB system using VBA. I have a ActiveX DTPicker so the user can select a date. This date is put in another textbox that is bound to a table. I do this because...
1
by: SkipNRun | last post by:
I am a novice when comes to JavaScript, AJAX. I am working on a form, which will allow users to update their contact information. In order to make the form flexible, I need to use pull down list. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.