473,387 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Button to be unclickable after it is clicked

How exactly is this possible?

I have messed around with some javascript to try to do this before, but what I used never seemed to work

like after the user clicks it once, it becomes unclickable or vanishes completely would also be fine with me

This is just one irritating thing I can't get to work for me and non of the examples I've found onliny work either
Sep 25 '07 #1
5 2430
dmjpro
2,476 2GB
How exactly is this possible?

I have messed around with some javascript to try to do this before, but what I used never seemed to work

like after the user clicks it once, it becomes unclickable or vanishes completely would also be fine with me

This is just one irritating thing I can't get to work for me and non of the examples I've found onliny work either
Post me your Code.

Kind regards,
Dmjpro.
Sep 25 '07 #2
gits
5,390 Expert Mod 4TB
hi ...

to disable a button use the disable property:

Expand|Select|Wrap|Line Numbers
  1. <input type="button" value="test_button" onclick="this.disabled = true;"/>
kind regards
Sep 25 '07 #3
thanks MUCH for that example ; )


but whenever it is like this

Expand|Select|Wrap|Line Numbers
  1. <form METHOD="POST" ACTION="login.php?ballaa"><input type="submit" value="test_button" onclick="this.disabled = true;"/></form>
it doesnt 'submit' the form to do the action

guess i should of been more specific than button since your answer works just not for what i didnt say ; P
Sep 26 '07 #4
dmjpro
2,476 2GB
thanks MUCH for that example ; )


but whenever it is like this

Expand|Select|Wrap|Line Numbers
  1. <form METHOD="POST" ACTION="login.php?ballaa"><input type="submit" value="test_button" onclick="this.disabled = true;"/></form>
it doesnt 'submit' the form to do the action

guess i should of been more specific than button since your answer works just not for what i didnt say ; P
Have a try with this.

Expand|Select|Wrap|Line Numbers
  1. <form METHOD="POST" ACTION="login.php?ballaa" onsubmit="return test()"><input type="submit" value="test_button" id="sub"/></form>

Expand|Select|Wrap|Line Numbers
  1. function test()
  2. {
  3.  document.getElementById('sub').disabled = true;
  4.  return true;
  5. }
  6.  
Good Luck :-)

Kind regards,
Dmjpro.
Sep 26 '07 #5
well that worked like a charm

thanks very much = )
Sep 27 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Stephen Melia | last post by:
Hello, I've just done a redesign of website, and it's gone terribly wrong for Internet Explorer 6. I have a two column layout, and for some reason links in the right hand column cannot be...
7
by: Jonas Smithson | last post by:
Hello all, I have an absolute positioned parent div, and nested inside it is an absolute positioned child div -- I mean the div *code* is nested inside, but the child is physically positioned so...
7
by: Amadelle | last post by:
Hi all and thanks in advance, I am stuck! I can't figure out how to identify which button was clicked on my ASP.NET page in the PostBack event? So what I am trying to do is to is to have an if...
24
by: Charles Law | last post by:
When I click a button I don't want the click event to fire. Is this possible? In fact, what I would really like is to be able to intercept the click event, perform some action, and then prevent...
11
by: bill | last post by:
I dynamically create buttons and associate them with an event using AddHandler. I want all the button events to fire at one time, when the page is posted, instead of when each button is clicked....
2
by: damonjulian | last post by:
hi ,i created 3 buttons such that if button1 is clicked it will disable button2 ,and clicking button3 will restore state of button2 to normal, to my dismay i find that button2 still responds to...
6
by: 85ssp | last post by:
I have a server applicatoin that has a multitude of labels related to the clients connected to it. When I have a number near 50 clients and i recieve a updatated status from each of the clients at...
6
by: ziycon | last post by:
I hope this is the right place for this question, I'm working on a site with HTML/CSS/PHP/AJAX and i have a form that i don't want the submit button to be 'enabled' or clickable until all the other...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.