Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: I wat to make the button move on mouseover

  • Subject: Re: I wat to make the button move on mouseover
  • From: "Bill Thomason" <billthomason@charter.net>
  • Date: Fri, 29 Apr 2005 09:59:39 -0400
  • Newsgroups: alt.html
  • References: <sQ6ce.23610$Jg7.11876@fe03.lga> <d4rn5c$1iun$1@godfrey.mcc.ac.uk>
  • Xref: news.mcc.ac.uk alt.html:286650
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" <newsgroups@schestowitz.com> wrote in message 
d4rn5c$1iun$1@godfrey.mcc.ac.uk">news:d4rn5c$1iun$1@godfrey.mcc.ac.uk...
> 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 



[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index