Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onMouseOver Question - I hope there's an answer....... 1

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US
[tt]Is there a way I can tell the code below to only work one time per MouseOver ?? I don't know java and was wondering. If so, please let me know how.
What I'm trying to do is remind my users that only 1 job at a time can be picked up and if they don't have a job picked up the second time they do a MouseOver the pop-up would not show up. Make sense? I hope you can help me. thanks [/tt]


<a href=&quot;mypage.asp&quot; onMouseOver=&quot;MM_popupMsg('You can only pick 1 job at a time')&quot;>Pick up this job</a>

&quot;The reward of one duty done is the power to fulfill another&quot;
<%
[afro]
Jr_Clown@Yahoo.com
%>
 
add this right after the <Script> tag

var isFirst=True;

Then in side the MM_popUpMessage fuction.

if (isFirst)
{

then at the end of the function.
}


this is as basic as I can explain it....if you send me the code from <script> to </Script> I could edit and send it back..

kcorbin@lifelinesys.com

 
It's not working

Can you please modify the code to make it work

[tt]Here's how I understood your suggestion[/tt]
<A href=&quot; onClick=&quot;MM_popupMsg if (isFirst)
{

('This is a Test')&quot;>}
This is a test JavaScript onMouseOver event that should only display the pop-up once.</A>



This line I understand after the <script> var isFirst=True;

Then in side the MM_popUpMessage fuction.

if (isFirst)
{

then at the end of the function.

}


&quot;The reward of one duty done is the power to fulfill another&quot;
<%
[afro]
Jr_Clown@Yahoo.com
%>
 
Hi,
Use this.

<Script>
var isFirst = true;

callMyFunction()
{
if (isFirst)
{
//do your processing here
isFirst = false;//so that second time nothing can be
//selected
}
else
alert ('Only 1 job is to be selected');
}
</Script>

Then in your code use
<a href=&quot;mypage.asp&quot; onMouseOver=&quot;callMyFunction()&quot;>Pick up this job</a>

I think this will solve your purpose.
Enjoy !!
 
If you don't want to put so much code on your page, do this:

<a
href=&quot;mypage.asp&quot;
onMouseOver=&quot;if (!window.isClicked)isClicked=true,callMyFunction();&quot;>
Pick up this job
</a>
bluebrain.gif
blueuniment.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top