Jump to content

anmldr

Members
  • Content Count

    27
  • Joined

  • Last visited

Community Reputation

0 Neutral

About anmldr

  • Rank
    Newbie
  1. I have used the script for creating an accordion from w3Schools . I would like to add a button somwhere on the page that would collapse all that are open. Even if it is just a reload of the page which would work. <script> var acc = document.getElementsByClassName("accordion"); var i; for (i = 0; i < acc.length; i++) { acc[i].addEventListener("click", function() { this.classList.toggle("active"); var panel = this.nextElementSibling; if (panel.style.display === "block") { pa
  2. How do you create a valid ul within an ul?This is not valid: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title></title></head><body><ul> <li>One</li> <li>Two</li> <ul> <li>a</li> <li>b</li> <li>c</li> </ul> <li>Three</li> <li>Four</li> <ul> <li>a</li> <li>b</li> <li>c<
  3. I found a way to do this with Wink Toolkit from http://www.winktoolkit.org/
  4. I have been searching for a script that would find a string in a page, highlight the found string and scroll to the found string. I found a bookmarklet but it has a horrible interface. It has "file://(null)" above the "Find Text". Also, I need to delete remove the "Found X matches" dialog.Here is the code that I found <p><strong><a href="java script:void%28s%3Dprompt%28%27Find%20text%3A%27%2C%27%27%29%29%3Bs%3D%27%28%27+s+%27%29%27%3Bx%3Dnew%20RegExp%28s%2C%27gi%27%29%3Brn%3DMath.floor%28Math.random%28%29*100%29%3Brid%3D%27z%27%20+%20rn%3Bb%20%3D%20document.body.innerHTML%3
  5. anmldr

    HTML5 Audio

    I am having difficulties with pages that have more than one <audio> on the iPhone/iPad when I use the default controls. I have not tested creating custom controls in-depth yet. The custom control has a "Start" button that changes to a "Pause". OK that works fine to pause the audio. But, when you go to the second audio control on the page, it will never play while the first one is paused. If you let the first one play all of the way through, the second one will play when the Play button is clicked. Is there a "Stop" function anywhere? If so, that would mean that I would need to crea
  6. It certainly does work. I will give credit where it is due. I don't know your name but I will have a comment with your user name and a listing for this thread in my eBook. I truly appreciate your time. What I appreciate almost as much is that you didn't say things like "you shouldn't do that", etc. etc. Instead, you tried to understand what I was trying to do and you worked to solve the problem for me. I don't mind trying to look things up for myself. I had just hit a brick wall and gotten more than a few comments from others on other forums that were not as helpful.Kindest regards,Linda
  7. I think that I figured out (partially) why it is not working for me. I was testing the pages on local files. When I uploaded them to my web site, it worked.Will this script work for local files?Here is what I uploaded. As I mentioned, it works on the web but not on the desktop as local files.http://www.anmldr.com/tThe only thing that I changed is the visibility to visible rather than hidden.LindaP.S. Thank you very much for your patience.
  8. I edited this post. At first, I thought that the code from post #7 worked perfectly. dsonesuk, what it seems to do is to go to the top of the same page that has the Back button on it rather than going to the top of the referring page.Yes, I did clear the cache and the browser history before starting.Linda
  9. I sure did but thanks for asking. It returns to the previous page but at the bottom of the page.Linda
  10. I did remove it. Thanks. But it still did not work for some reason. I will look at your other post now.Thanks,Linda
  11. Because the "Back" button would serve 2 purposes. It would in most instances return to the previous page in the book. But, if they arrive at that page from say the Table of Contents page or a link that points to an illustration, they may want to return to the Table of Contents or the page that points to the illustration and not to the previous page in the book. "Back" is less verbose and takes up less screen space. It won't be a web site. It is a collection of linked documents that will be readable within a native PDA app. There will not be a browser back button.<a href="java script:locat
  12. I have some buttons on the bottom of a page. This is essentially an eBook. There is a static button that is the same for all pages that links to the Index page. That works fine. There is a Next button to go to the next page in the book. It is the Back button that I am having problems with.I tried <a href="#" onclick="history.back(); return false;"> but this just goes to the bottom of the previous page---where the buttons are located. How to I specify to go to the top of the page?The reason that I don't link to the previous page in the book is that it is also possible to get to the
  13. How can I change a query string of a link based on the inner HTML of an <h1> tag? This <h1> changes based on the information displayed on a page.TIA,Linda
  14. I made a note that this is probably also needed in Safari. My first test shows that it is working.Thanks,Linda
  15. Thanks for both of your answers. Perhaps I should explain why I want to do this and there may be another answer.When a page loads, I want to check a cookie and then change the class of a div depending on the value of the cookie. When someone clicks a link, everything works as expected. When they click the back button, the page is (I assume) the cached page and so the cookie is not checked in the onLoad event.Also, these pages will not be posted on the web on a server. Instead, they will be all in one folder on the user's computer.Thank you,Linda
×
×
  • Create New...