Thread: OnMouseDown

  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Rep Power



    i have text field which value already populate in and not leeting user to override the value from it.

    I use onkeydown return false and it worked fine for not letting user remove the value. However, i still do copy and paste into it. I try onMouseDown return false but it seems didn't work. Does any one know to prevent user from copy and paste?


    <input type="text" name="fname" value="#myqyery.fname#" onclick="return false" onkeydown="return false" onMouseDown="return false" />
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Rep Power

    no need to reinvent the wheel: the readonly attribute

    Any browser element can be manipulated, though. So if this is supposed to be some "security feature", it won't work. The fname value that arrives at your server can be anything.
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".

IMN logo majestic logo threadwatch logo seochat tools logo