Disable An Onclick After Clicking It?

Feb 12, 2010

Is it possible disable an onclick after clicking it and then enable it from another onclick by id

<img id="one" href="images/homepage/sliders/bonus_button.jpg" style="position:relative; top:30px; left:50px; height:30px; width:70px; float:left;">

This code runs when it is clicked:

$("#one").click(function() {
runEffectB();
return false;
});

What I would like to happen is for either runEffectB() to not run if it was just run or to disable the #one.click once it has run. I am assuming I will be able to re-enable it from another onclick running a similar function.

View 1 Replies


ADVERTISEMENT

Stop Users From Double Clicking On The Page Or Disable Double Clicking?

Sep 3, 2009

I have a page that submits to a db then re-loads its self with new information. Unfortunately it goes wrong when the user double clicks on a one of many text links that provides the info for the display on reload. How do I stop users from double clicking on the page? Ideally I think I would like to call some sort of js function from body onload as I presume this would then cover the whole of the page, but have no idea if this is possible or how to go about writing it.

View 8 Replies View Related

Disable Right Mouse Clicking?

Dec 7, 2009

how is it possible to disable right mouse clicking in javascript!?!? my library did it so i know it CAN be done..

View 5 Replies View Related

JQuery :: Temporary Disable Any Clicking?

Nov 8, 2011

Is there any way to temporary disable any clicks? I've made a jquery code where you press a button and after 1,4 sec it will go to the next screen. But I don't want people to click on anything within those 1,4 sec.

View 1 Replies View Related

Disable Image Link After Clicking

Aug 17, 2005

i've searched this forum before posting but didn't find a "clean" solution to my problem.
I have an image with a link on it:

Code:

<a href="#null" onClick="addValue('bold');"><img src="images/myimage.gif" title="Some text" alt="Some text" /></a>
which adds the value in a textarea in the same page via this function:

Code:

function addValue( val ) {

var tb = document.forms['valuesform'].elements['valuesfield'];

if ( tb.value.length > 0 ) tb.value += " , ";

tb.value += val;
}

I need to disable the link after the image has been clicked,preventing multiple insertions of the same value. I've modified the link this way:

Code:

<a href="#null" onClick="addValue('bold'); this.onclick=null;" ><img ......
but while only one click is allowed,i get many JS errors in the JSConsole like

Code:

uncaught exception etc.... and i think this is not a good sign.=

View 4 Replies View Related

Disable Tr Onclick Event...

Jul 23, 2005

i have a really big table... and the <tr> tags have onclick/onmouseover
events that highlight a row when you drag your mouse over it, and open a
popup window when you click anywhere in the row...

if i however have some text in the row that has an href link attached to it,
when i click on the link it will go to the href url AND open the popup
window...

is there any way to stop the popup window from opening when i click a
certain link within a row?

View 1 Replies View Related

Disable Submit Button After Onclick?

Nov 23, 2009

I have the following code:

<input type="button" name="button" value="Submit"
onclick="javascript:get(this.myform);">

How can I change this to make this button disabled after the onclick?

View 1 Replies View Related

OnClick Event - Disable The Form Section

Aug 12, 2009

As it's a charity, there are some variables such as whether or not to claim Gift Aid from the tax man. Therefore, various table inputs need to be optional. My initial thought was a longwinded dropdown of the various options. For example, if they want us to claim gift aid, the option to fill in name/address etc needs to become available. I just need to know how to disable the form section.

[Code]...

View 5 Replies View Related

Disable Submit Form Button OnClick

Feb 1, 2005

I am trying to disable the submit button and submit the form onclick

<input name="submit" type="submit" onclick="this.type='button'this.form.submit();" value="send message" style="color: #000080; border: 1px solid #336699; background-color: #FFFFFF; font-family:Verdana; font-weight:bold">

View 2 Replies View Related

Onclick Event - Prevent People From Clicking "search" Twice

Jun 15, 2010

I have very intense php script that takes from 5 - 30 seconds to execute, depending on user request. So I want to prevent people from clicking "search" twice, so I decided to glue it by disabling button on click.
Here is my code:

[Code]...

But, for some reason it won't proceed. JS executes fine, but form won't go on. What is wrong?

View 1 Replies View Related

OnClick = Disable Button - Text In Form = Enable Button

May 19, 2009

I have a message system that I want to prevent double posting. So when a user sends a message i would like to disable the button. But its done using AJAX and will load without much time. But enough to cause double clicking. So now the button needs to be enabled once Text is put in the Form Field.

View 2 Replies View Related

Clicking A Button To Make Something Appear, And Then Clicking It Again To Make It Dis?

Mar 4, 2010

so I have a button that makes a table appear absolutely(dynamically), and I was wondering how would I go about making it disappear once I made it appear.

View 3 Replies View Related

Make An Onclick Event Change The Document.onclick ?

Sep 4, 2010

I want to make it so that when I click on something, it changes what document.onclick does.

This is a simplified version of what I'm trying to do:

Code:
<div id="clickme" onclick="document.onclick = function(){ alert ('This should not be alerted on the first click'); }">Click here</div>

However, as you'll notice, the alert box shows up on the first click as well. The only way I have been able to get around this behaviour is to have the first onclick execute a timer that will then set the document.onclick after 1ms, however this seems very messy to me.

View 1 Replies View Related

Clicking Buttons

Jul 20, 2005

I have some buttons on an
HTML form. When I click a button, it just gives the button focus. Then I
need to click again for the onClick actions to take place. How do I get
the buttons to work on the fist clck, rather two click or double click. I
have set tab order and have used xxx.focus() to give the first field on
the form fuoc after the form loads. can this be screwing the buttons up.

View 1 Replies View Related

How To Keep Clicking A Button

Sep 5, 2009

I need to use javascript in a way in which it will keep clicking a button. The source code for that button is below:

<script type="text/javascript">
function set_opacity(id, opacity) {
element = document.getElementById(id)

[code]....

Therefore, I need javascript to keep clicking the button until it has clicked it 375 times.

View 3 Replies View Related

By Clicking On <td> Go To Profile

Mar 17, 2009

I have got a <table> and on some <td> i have a user. Now, if you click on one of those <td>s, i want the code to go to the user profile site.

View 5 Replies View Related

Close A Div When Clicking Outside It

Jun 4, 2010

I have a time picker, where the user clicks the icon then a div (with a list of times) pops up. My problem is that if i click else where on the page, the time picker div stays open. This happens on all browsers (FF, IE, Safari, Opera)

I have been trawling the net to find something that will close this div when the user clicks elsewhere on the page and this seems to be pretty much what i want to do

Code:

The only thing is that it only works the first time. If i want to amend the time at any point, then the div fades out automatically. Is there anyway to reset this jquery once the user has clicked away from the div?

View 3 Replies View Related

Close Div When Clicking Outside Of It

Jan 22, 2010

I've got a div that is displayed by clicking a link (visibility is set to 'visible'. Now I want to close the div by clicking outside of it.

View 4 Replies View Related

Keep Onmouseovers On After Clicking On Them?

Apr 23, 2010

keep the menu links on, after they are clicked. Also, will I need to edit each page for this function?

[URL]

View 1 Replies View Related

Hiding A DIV By Clicking Anywhere

Mar 28, 2011

I found this code to Show/Hide a DIV. The great thing about it is that will hide the div by clicking anywhere outside the div, which this does.

However, how can I edit this to allow for multiple DIVs?

If you can't help with this particular code, Do you have another code solution I can use for individually showing many divs and then hiding them by clicking outside the div.

View 1 Replies View Related

JQuery :: Clicking Anywhere But On A Particular A Tag?

Nov 8, 2011

I have a webpage with lots of links, buttons, text etc. The page also has an <A class="mylink" HREF="#">Click here</a> tag.

What exactly I want is, if I click anywhere on the page, button, text or any other <A></A> tag on that page except the A tag that has the class="mylink", an alert() should popup.I tried the following but I still see the alert when I click on the <A class="mylink" HREF="#">Click here</a> tag.

Code:

<script>
$(document).ready(function(){
$(document).click(function(){

[code]....

View 3 Replies View Related

AddFavorite By Clicking An Image

Jul 23, 2005

I'm using the following to try to create an image that if clicked on, will
throw up the IE add bookmark, but it doesn't work. Can anyone suggest how
to do this?

<a><img src="images/default_static.gif" width="334" height="110" border="0"

y Mooses')"></a>

View 1 Replies View Related

Clicking Image Map Highlights Row

Jul 23, 2005

I have an image map of a subdivision and each section of land in the
subdivision has a lot number on it. Below the image map I have a table
with details about each lot (eg Lot Number, Lot Size, Lot Price
ect...)

I would really like a way so the user can click on the image map and
the corresponding row below the image will be highlighted.

The user clicks on a new row and the previous row goes back to its
original color and the new row is highlighted.

Is the possible? If it is and can someone please point me in the right
direction on how you would do this?

View 10 Replies View Related

JQuery :: Always Clicking Twice With .toggle()?

Oct 7, 2010

I have a page with the code below (you can see the page herehttp://thegamingmall.com/realsite/testing.html). I'm using the .toggle() function to show/hide a div tag. However you ALWAYS need to click it twice! It's driving me and the users insane.

<!DOCTYPE html>
<html>
<head>
</head>

[code].....

View 2 Replies View Related

JQuery :: Clicking Select Box ?

Jun 11, 2009

You know when you click on a select box (size=1) and then the options show up? I'm looking to simulate that with jQuery.

What I would like to happen is I have an image I am using as my "down arrow". It would be a custom image laid over the select box. If you click the select, it will drop down the options, but if you click the image, nothing happens. I want those options to drop down.

I got as far as:

But it's not a focus I want, and .click() doesn't work.

View 2 Replies View Related

JQuery :: Div To Disappear When Clicking Outside It?

Apr 21, 2010

So, I have a content div and a floating sidebar (that's draggable). When I click on the content div, I want another div (with id #formatting) to appear inside the sidebar. This is already working.When I click outside the content div I want the #formatting div to disappear — but if I click inside the #formatting div it also disappears. How can I get it to stay there when I click inside the sidebar?Should I use an if statement, or are there other options?

$('#content').focus(function() {
$('#formatting').show('fast', function() {
//

[code]....

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved