iwato Posted May 6, 2018 Share Posted May 6, 2018 I recently tried, on my own machine, to implement three code segments (HTML, CSS, and Javascript) that I found on Fiddler. What I thought would be a quick aside turned into well over an hour's worth of failed experimentation. Can you find anything wrong with the code that I was not able (click on Fiddler above). I do not like to leave unfinished work in defeat, but must move on. Matomo is just plain exciting! Roddy Link to comment Share on other sites More sharing options...
Ingolme Posted May 6, 2018 Share Posted May 6, 2018 I just tested the code in three browsers and it is working correctly, even in Internet Explorer. What is the issue? Link to comment Share on other sites More sharing options...
iwato Posted May 6, 2018 Author Share Posted May 6, 2018 I have no trouble making the code work in the Fiddle context either. It is when I take it out of context that it fails. Roddy Link to comment Share on other sites More sharing options...
Ingolme Posted May 6, 2018 Share Posted May 6, 2018 I can't help you if you don't show me the code in a context where it doesn't work. 1 Link to comment Share on other sites More sharing options...
iwato Posted May 6, 2018 Author Share Posted May 6, 2018 I realize this, but it is fairly complex. With your prompting I just eliminated the context and was able to make it work. For the moment this will have to be satisfactory. Thanks! Roddy Link to comment Share on other sites More sharing options...
iwato Posted May 6, 2018 Author Share Posted May 6, 2018 (edited) ADDENDUM: For what it is worth, I discovered the problem by working backward from a blank HTML file. The appearance of any addition <h3> element disrupts the procedure. QUESTION: How would you explain this? What would cause the script to fail in the presence of another <h3> tag? Roddy Edited May 6, 2018 by iwato Link to comment Share on other sites More sharing options...
Ingolme Posted May 7, 2018 Share Posted May 7, 2018 The Javascript only targets the first h3 element on the page, it's pretty obvious from the code. I would hope you're not just copying and pasting code without knowing what it does. Link to comment Share on other sites More sharing options...
iwato Posted May 7, 2018 Author Share Posted May 7, 2018 That might be the reason that I ask. Javascript is still a little foreign to me. I work much better with PHP. Roddy Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now