Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #31630 > unrolled thread
| Started by | justaguy <lichunshen84@gmail.com> |
|---|---|
| First post | 2016-10-30 13:40 -0700 |
| Last post | 2016-10-30 15:02 -0700 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.javascript
How to reset onclick event? justaguy <lichunshen84@gmail.com> - 2016-10-30 13:40 -0700
Re: How to reset onclick event? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-10-30 22:22 +0100
Re: How to reset onclick event? justaguy <lichunshen84@gmail.com> - 2016-10-30 15:02 -0700
| From | justaguy <lichunshen84@gmail.com> |
|---|---|
| Date | 2016-10-30 13:40 -0700 |
| Subject | How to reset onclick event? |
| Message-ID | <338322b0-87aa-452b-a4da-54fb4a012218@googlegroups.com> |
I attempted to reset the onclick event action at Line 13 and 14 below but it had no effect. What's the correct way to do it?
Thanks.
Line 1: var config = function() {
Line 2: // display config / usage info but no dupe display
Line 3: if (!document.getElementById('confinfo')) {
Line 4: var i = document.createElement('info');
Line 5: i.id = "confinfo";
Line 6: i.style = "color:green";
Line 7: i.innerHTML = "Info goes here...";
Line 8: document.body.insertBefore(i,document.body.firstChild);
Line 9:
Line 10: // hide the config / usage info to free up the real estate
Line 11: var h = document.getElementById('usage').value = "Hide config / usage instructions";
Line 12: console.log('from top section: ' +h);
Line 13: h.onclick = null;
Line 14: h.onclick = function () {
Line 15: console.log('hide clicked');
Line 16: // document.getElementById('confinfo').style.display = "none";
Line 17: document.getElementById('confinfo').innerHTML = '';
Line 18: }
Line 19: }
Line 20: }
[toc] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2016-10-30 22:22 +0100 |
| Message-ID | <XnsA6B1E392EF39Ceejj99@194.109.6.166> |
| In reply to | #31630 |
justaguy <lichunshen84@gmail.com> wrote on 30 Oct 2016 in comp.lang.javascript: > I attempted to reset the onclick event action at Line 13 and 14 below > but it had no effect. What's the correct way to do it? Please do not start a second thread on the same subject. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | justaguy <lichunshen84@gmail.com> |
|---|---|
| Date | 2016-10-30 15:02 -0700 |
| Message-ID | <16e0385e-7609-4845-8633-89c584e3b462@googlegroups.com> |
| In reply to | #31633 |
On Sunday, October 30, 2016 at 5:22:22 PM UTC-4, Evertjan. wrote: > justaguy > wrote on 30 Oct 2016 in > comp.lang.javascript: > > > I attempted to reset the onclick event action at Line 13 and 14 below > > but it had no effect. What's the correct way to do it? > > Please do not start a second thread on the same subject. > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress) My mistake, will remove it in a sec.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web