Hello
I have for example
<IMG alt="image" id="IMG1" src="../images/play1.gif"
onClick="getSou nd(this);">
Can I disable this (stop onlick from working) until another action has
been completed?
I imagine I use
document.getEle mentById('IMG1' ).style.disable d = 'true';
but it doesn't stop the getSound() function from working ...
Cheers
Geoff 5 1883
Geoff Cox wrote on 14 apr 2008 in comp.lang.javas cript:
Hello
I have for example
<IMG alt="image" id="IMG1" src="../images/play1.gif"
onClick="getSou nd(this);">
Can I disable this (stop onlick from working) until another action has
been completed?
I imagine I use
document.getEle mentById('IMG1' ).style.disable d = 'true';
You are inventing a language: CSS styles has no disable,
a img cannot be disabled as it has(!) no action.
Try:
notYet = true;
........
onClick="if (!notYet) getSound(this); "
or make the img not displayed by:
...style.displa y = 'none';
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
On Apr 14, 9:14*pm, Geoff Cox <g...@freeuk.no tcomwrote:
Hello
I have for example
<IMG alt="image" id="IMG1" src="../images/play1.gif"
onClick="getSou nd(this);">
Can I disable this (stop onlick from working) until another action has
been completed?
One way is to add the click handler when the "other" action finishes.
Another is to set a variable and check its value when calling
getSound. Change its value when the other function runs so getSound
knows.
I imagine I use
document.getEle mentById('IMG1' ).style.disable d = 'true';
Don't guess, the disabled attribute is valid for BUTTON, INPUT,
OPTGROUP, OPTION, SELECT and TEXTAREA elements, not IMG:
<URL: http://www.w3.org/TR/html4/interact/...#adef-disabled >
--
Rob
On Mon, 14 Apr 2008 05:13:31 -0700 (PDT), RobG <rg***@iinet.ne t.au>
wrote:
>On Apr 14, 9:14*pm, Geoff Cox <g...@freeuk.no tcomwrote:
>Hello
I have for example
<IMG alt="image" id="IMG1" src="../images/play1.gif" onClick="getSo und(this);">
Can I disable this (stop onlick from working) until another action has been completed?
One way is to add the click handler when the "other" action finishes. Another is to set a variable and check its value when calling getSound. Change its value when the other function runs so getSound knows.
>I imagine I use
document.getEl ementById('IMG1 ').style.disabl ed = 'true';
Don't guess, the disabled attribute is valid for BUTTON, INPUT, OPTGROUP, OPTION, SELECT and TEXTAREA elements, not IMG:
Thanks Rob - I will try your suggestions.
Cheers
Geoff
> <URL: http://www.w3.org/TR/html4/interact/...#adef-disabled >
On 14 Apr 2008 12:12:11 GMT, "Evertjan."
<ex************ **@interxnl.net wrote:
>Geoff Cox wrote on 14 apr 2008 in comp.lang.javas cript:
>Hello
I have for example
<IMG alt="image" id="IMG1" src="../images/play1.gif" onClick="getSo und(this);">
Can I disable this (stop onlick from working) until another action has been completed?
I imagine I use
document.getEl ementById('IMG1 ').style.disabl ed = 'true';
You are inventing a language: CSS styles has no disable, a img cannot be disabled as it has(!) no action.
Try:
notYet = true; ....... onClick="if (!notYet) getSound(this); "
or make the img not displayed by:
...style.displa y = 'none';
OK - will try out these ideas.
What I really want is to disable the onClick not event not the image .
Cheers
Geoff
Geoff Cox wrote on 14 apr 2008 in comp.lang.javas cript:
>>You are inventing a language: CSS styles has no disable, a img cannot be disabled as it has(!) no action.
Try:
notYet = true; ....... onClick="if (!notYet) getSound(this); "
or make the img not displayed by:
...style.displ ay = 'none';
OK - will try out these ideas.
What I really want is to disable the onClick not event not the image .
Whet is an "onClick not event" ?
Perhaps putting some commas in the sentense would make it clear to me.
Are you still inventing the language and the event mechanism?
You cannot disable an html event listener.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dennis Allen |
last post by:
Hi. What's the best way to display an image, disabling the user's ability
to right-click on it?
I believe you have to use <body oncontextmenu="return false">. Would the
following work?
var x = "<head><\/head><body oncontextmenu="return false"><img
src='temp.jpg' border=0><\/body>"
top.document.open()
|
by: Els |
last post by:
Hi,
I would like an opinion on the following:
I have a page which is made up of background-images with transparent
linked images in front of it, which on hover show text in CSS popups.
Due to appropriate alt text, anyone viewing the page with images
turned off, will see the alt text instead, and on hover will see the
popups.
|
by: udir |
last post by:
Hi all,
I have a ToolBar on my form. Each button associated to an image from an
ImageList.
Why when I disable the button, the button becomes all gray ( and not
grayscale image ) ?
Do I have to apply a second grayscale image for each button for disable mode ?
|
by: Kamyar Souri |
last post by:
How can I disable Image caching?
I use ASP.NET Image web control that it's ImageUrl is constant but the image
is being changed by the code. because of cachin I always see the same image
in my Image web control.
Thank you in advance.
|
by: junlia |
last post by:
Does anyone how how can we disable the auto-postback feature in asp.net page?
I have to use a server side control in the page, but the auto post back
feature in it causes problems for me. Please help!
Thanks much,
Junlia
| |
by: wkerplunk |
last post by:
On mouseover it goes to the correct map say TheMap1.jpg and then on mouseOut it defaults back to map, I need to do a onClick that sets the TheMap1.jpg mouseOver to the default TheMap.jpg so the TheMap1.jpg is now the default image not the TheMap.jpg. So after I click for information, and mouseOut of that area TheMap1.jpg will stay as all the MouseOuts Until I click another area of the map say TheMap10.jpg once clicked TheMap10.jpg will become...
|
by: tshad |
last post by:
I have a page that has about 20 textboxes and dropdowns that I want to
disable until a button is pushed.
I don't want them to be hidden which I can do with <div visible=false
runat=serveror <asp:panel visible=false runat=server>. I want them to see
the whole page but just disable all the controls on the bottom 3/4 of the
page.
I could do it by just doing each control one at a time but then if I add or
take a control off the page I...
|
by: boert89 |
last post by:
Hi all,
I've been trying to work this out myself for the last couple of weeks - I even asked my teachers in school, but no one could help. So you're my last chance. Thanks for any help in advance.
I'm trying to include a picture in a form. The guide I've been using is from http://www.databasedev.co.uk/bound_image_form.html. So I'm storing the address of the picture in a table and I then use the OnCurrent event to set the picture property of...
|
by: vaniKanabathy |
last post by:
I had used toolbar to replace button usage in program . I had disable the image button in toolbar but it not displayed in a shaded mode when disabled. How can i do it because i want to differentiate between enable and disable by see the image appearance, not by click the image button in toolbar. Please help me...i need it urgently....I do disble the toolbar image button using the below coding....
Toolbar1.Buttons(3).Enabled = False
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |