I wat to make the button move on mouseover

Discussion in 'HTML' started by Bill Thomason, Apr 28, 2005.

  1. I have a simple question. I know i've seen the code before but am unable to
    find it.
    when a user trys to click on a button i want it to move away from them. i
    want to play a joke on one of our users. been hitting the button before
    they're done.
    don't remember if it was onmouseover or when focused.

    Thanks,
    Bill
     
    Bill Thomason, Apr 28, 2005
    #1
    1. Advertising

  2. Bill Thomason wrote:

    > I have a simple question. I know i've seen the code before but am unable
    > to find it.
    > when a user trys to click on a button i want it to move away from them. i
    > want to play a joke on one of our users. been hitting the button before
    > they're done.
    > don't remember if it was onmouseover or when focused.
    >
    > Thanks,
    > Bill


    See the CSS buttons in:

    http://www.schestowitz.com/proj.htm

    Change the values to make the movement greater as I don't think there is a
    limit. Microsoft played a similar joke which only affects Firefox (see the
    first 2 screenshots):

    http://schestowitz.com/Weblog/archives/2005/03/23/ie_ban/

    Hope it helps,

    Roy
     
    Roy Schestowitz, Apr 28, 2005
    #2
    1. Advertising

  3. found it. thanks for your help.
    for anybody else that might want to use it.
    here is the code i was sent. I modified it for what i wanted to do and
    worked like a charm. koodos to Chris
    Bill

    <!-- TWO STEPS TO INSTALL SHY BUTTON:

    1. Copy the coding into the HEAD of your HTML document
    2. Add the last code into the BODY of your HTML document -->

    <!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

    <HEAD>

    <SCRIPT LANGUAGE="JavaScript">

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    var flag = 1;
    function t() {
    if(flag == 1) {
    N.style.top = "75px";
    N.style.left = "700px";
    }
    if(flag == 2) {
    N.style.top = "115px";
    N.style.left = "100px";
    }
    if(flag == 3) {
    N.style.top = "300px";
    N.style.left = "350px";
    }
    flag = flag + 1;
    if(flag == 4) {
    flag = 1;
    }
    }
    function al() {
    alert("Correct!");
    }
    // End -->
    </script>

    </HEAD>

    <!-- STEP TWO: Copy this code into the BODY of your HTML document -->

    <BODY>

    <center>
    Is the JavaScript Source the best place to find JavaScripts?
    </center>
    <DIV ID="N" STYLE="position:absolute; left:350px; top:300px; width:50px;
    height:50px;">
    <form>
    <input type=button value="NO" onMouseover="t()">
    </form>
    </DIV>
    <DIV ID="Y" STYLE="position:absolute; left:300px; top:300px; width:50px;
    height:50px;">
    <form>
    <input type=button value="YES" onClick="al()">
    </form>
    </DIV>

    <p><center>
    <font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
    </center><p>

    "Roy Schestowitz" <> wrote in message
    news:d4rn5c$1iun$...
    > Bill Thomason wrote:
    >
    >> I have a simple question. I know i've seen the code before but am unable
    >> to find it.
    >> when a user trys to click on a button i want it to move away from them. i
    >> want to play a joke on one of our users. been hitting the button before
    >> they're done.
    >> don't remember if it was onmouseover or when focused.
    >>
    >> Thanks,
    >> Bill

    >
    > See the CSS buttons in:
    >
    > http://www.schestowitz.com/proj.htm
    >
    > Change the values to make the movement greater as I don't think there is a
    > limit. Microsoft played a similar joke which only affects Firefox (see the
    > first 2 screenshots):
    >
    > http://schestowitz.com/Weblog/archives/2005/03/23/ie_ban/
    >
    > Hope it helps,
    >
    > Roy
     
    Bill Thomason, Apr 29, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve
    Replies:
    0
    Views:
    337
    Steve
    Sep 15, 2005
  2. =?Utf-8?B?dGUgZ29vZHk=?=

    Openning WAT does NOT reate aspnetdb.mbf

    =?Utf-8?B?dGUgZ29vZHk=?=, Feb 8, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    2,098
    =?Utf-8?B?dGUgZ29vZHk=?=
    Feb 8, 2006
  3. =?Utf-8?B?dGUgZ29vZHk=?=
    Replies:
    0
    Views:
    2,189
    =?Utf-8?B?dGUgZ29vZHk=?=
    Feb 8, 2006
  4. cracker
    Replies:
    2
    Views:
    409
    Sybren Stuvel
    May 19, 2006
  5. =?Utf-8?B?Q2hhcmxlc0E=?=

    the dreaded WAT is not working

    =?Utf-8?B?Q2hhcmxlc0E=?=, Nov 10, 2006, in forum: ASP .Net
    Replies:
    11
    Views:
    548
    Kevin Spencer
    Nov 11, 2006
Loading...

Share This Page