473,386 Members | 1,644 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,386 software developers and data experts.

Enabling & disabling image buttons

I'm using image in an anchor tag as a submit button.
We use
document.images['img_name'].parentElement.removeAttribute('href') in a
javascript
function to make a image button non-clickable (not-hyperlink). How do
we make it
clickable again (have a hyperlink).

Thanks in advance

Aug 10 '06 #1
1 1965
barq said the following on 8/10/2006 4:43 PM:
I'm using image in an anchor tag as a submit button.
We use
document.images['img_name'].parentElement.removeAttribute('href') in a
javascript
function to make a image button non-clickable (not-hyperlink). How do
we make it
clickable again (have a hyperlink).
Hmmm. Did you try setting it's href property?

But, trying to remove it's href property is a dumb way to try to make a
link non-clickable. Set it's onclick property to return true/false.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 10 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: R.Balaji | last post by:
Hi, We are developing a windows application using c#. We have created a toolbar with some toolbar buttons. When we disable the toolbar button, the toolbar button image should be displayed...
1
by: markeboy | last post by:
What is the workaround to prevent toolbar buttons from displaying a grey square where the image should be once the toolbar button is disabled I have transparent color of the image list set to...
2
by: dougawells | last post by:
Hi- I'm wanting to have a set of radio buttons disabled when a form is displayed, then if they check another specific radio button, those would become enabled. I've tried setting it via...
1
by: hello2008 | last post by:
Hi, I have just started coding in PHP. I have coded a web page using HTML, JS, and PHP. An HTML table has to be populated dynamically using the data from the backend. Presently I have 5...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.