Jump to content

Funce

Moderator
  • Posts

    602
  • Joined

  • Last visited

  • Days Won

    19

Everything posted by Funce

  1. From what I've observed, keys insert their characters on `keydown`. Preventing propagation on `keyup` wouldn't do anything as all the events already propagated on a different one.
  2. There's a couple of small pages on React and Vue, probably good enough to get a starting point. They're not full tutorials, but I imagine they're good for those that want to get into it. https://www.w3schools.com/whatis/whatis_react.asp https://www.w3schools.com/whatis/whatis_vue.asp
  3. Are there any specific ones you personally want to see added to the website?
  4. Expanding on what dsonesuk has said, a more fitting representation of this list is [ 0: 'BMW', 1: 'MAHINDRA', 2: 'HERO', 3: 'KTM' ] It is technically ordered, just not by what you think.
  5. Hi Roddy, Here's what I can piece together from the help file. (If I'm not mistaken, it may be the one you are referring to) https://matomo.org/docs/setup-auto-archiving/ `core:archive` is the command being run, much like 'mkdir' or 'cat' in other command lines. I am unsure of whether the command is in two parts and parsed together (archive command of core module) or otherwise. At the bottom of the page, you can see the help output of the command.
  6. As far as I'm aware, Date objects require complete dates to be created. (Needs a Year and a Day in addition to the month so the whole object works) You'll want to put some placeholder year and day values in the format YYYY-MM-DD. Something like this would work to create your Date object. $dateObj = new DateTime('2000-' . $monthNum . '-01'); However if you wanted something more concise, just the month number, you could use this. $monthName = date('F', strtotime('2000-' . $monthNum . '-01'));
  7. Apologies for the interjection, this isn't exactly correct, both procedural and OO Style use objects as parameters and returns. (mysqli_stmt_init returns a mysqli_stmt object) But the advice is still valid, try not to mix them.
  8. So, uh, are you having any particular issues in completing this?
  9. Apologies vmars, I may have replied to an earlier thread you made..
  10. You can use the XML tools plugin for Notepad++ Details: https://stackoverflow.com/questions/28199308/how-to-indent-html-tags-in-notepad/37617122
  11. Hi there! Just a few issues things to fix up and you're good to go! You've got a bunch of HTML comments inside your CSS and your JS, you'll need to change them to proper styles. CSS uses /* code */ for commenting JS uses /* code */ for multiline comments and // code for single line comnments. Your added elements on your page never have the styling classes added to them. Have a look here for more of the technical details: https://www.w3schools.com/howto/howto_js_add_class.asp An example for CreateArticleHeader function createArticleHeader(text = "Article Heading") { var p_ah = document.createElement("p"); // alert{"p_ah"}; p_ah.innerHTML = text; p_ah.setAttribute("contenteditable", "true"); // Add class for styling p_ah.classList.add("p_ah"); var content = document.getElementById("content"); content.appendChild(p_ah); } In terms of compatibility, as long as you add only one class per use of classList.add, you'll be able to support IE. https://developer.mozilla.org/en-US/docs/Web/API/Element/classList Now because of the way this works, you'll need to change your styling to use .p_ah instead of #p_ah and change the original Article Heading attributes from id="p_ah" to class="p_ah" And the same for p_tgh and the original Text Paragraph <p contenteditable class="p_ah">Article Heading</p> .p_ah { font-size: 18px; font-style: bold; }
  12. Hi Russel, My experience with apache is that localhost normally serves from /htdocs/, so your webpage is possibly making you look for "C:/Apache24/Apache24/htdocs/The_book_of_Revelation_14a.mp4" instead of where it actually is. Also is this website hosted on an external server? Or otherwise accessible by multiple devices? There are three sorts of links that are common with most websites Absolute Links. (http://localhost/The_book_of_Revelation_14a.mp4) I consider these only useful for external resources on another domain. These look at the exact address specified for resources and pages. Relative Links. (./The_book_of_Revelation_14a.webm OR The_book_of_Revelation_14a.webm) I don't use these normally, because I end up having to move files around a lot. But they're quite nice for linking to other pages that you know are always going to be bundled together. They look for the file relative to the current page that is opened. Relative to Root Links (/The_book_of_Revelation_14a.mp4) I find these links to be excellent, as they nicely translate from my testing environment to the production one without changes. These ones look at the current domain base to find the file. May I recommend trying a relative to root link. (Note the / only) <source src="/The_book_of_Revelation_14a.webm" type="video/webm">
  13. Heck sorry about that, that was my advice. Just checked MDN, its a feature of ES2015. Only Internet Explorer doesn't seem to be supported by it. (Had no idea it was 'new') https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters
  14. Try uploading it to a site like imgur and use the link to the image as a src attribute for your img element.
  15. Funce

    Update SQL

    Try this instead $sql="SELECT * FROM taxis"; I don't know any more from your situation to improve it.
  16. Alternatively, instead of my fix earlier, you can add a default parameter. This will fallback to a given value, should it not be included when the function is called. function createTextArea(text= "Sample Text") { var p_tgh = document.createElement("p"); p_tgh.innerHTML = text; p_tgh.setAttribute("contenteditable", "true"); var content = document.getElementById("content"); content.appendChild(p_tgh); }
  17. function createTextArea(text) { var p_tgh = document.createElement("p"); p_tgh.innerHTML = text; p_tgh.setAttribute("contenteditable", "true"); var content = document.getElementById("content"); content.appendChild(p_tgh); } If you call this function with no arguments ie. createTextArea() Then inside the function, the value of text is undefined. Because text hasn't been defined to be anything.
  18. There's a lot of errors in your code: JS Variable names can't have .'s in them. Make them like p_tgh createElement literally creates an element of that type. This isn't the behaviour you desire. <p.tgh></p.tgh> CreateTextArea is used before its defined, switch the two script blocks around. Your text is 'undefined' due to the fact you call CreateTextArea() without any arguments. Which means the text variable is undefined. If you want to add default text (for when you click the button) you'll need to change the buttons. onclick=CreateTextArea("Sample Text") Why are you calling the functions createTextArea and createArticleHeader on their own? HTML You're missing a closing <div> (I placed the closing div right before closing body) CSS Class Styling uses a . in CSS. Using p,ah styles ALL <p> and ALL <ah> (which isn't a tag I've ever seen) Same with p,tgh You probably want p.ah which is for <p class="ah"></p>
  19. A good reference page I could spy was here. https://www.w3schools.com/howto/howto_js_add_class.asp
  20. Funce

    Update SQL

    If your submit button isn't set, you would logically assume that no $_POST variables have been sent through. You would never have $_POST['taxi_radio'] defined.
  21. Hey its no worries. There's an alternative that I use regularly on my website when I need to use create consistent page headers/navigation/menus. It does exactly as you specify. If you create a php file (Or change an existing html file to a php one) you'll be able to take your home page and do this. <!-- index.php --> <div class="dropdown"> <a href="#">Links</a> <div class="dropdown-content"> <?php include "links.html"; ?> </div> </div> The only thing is you can't test php files straight from your file system. You'll only be able to see it on the website or a local server you've set up. (if your web host supports PHP even).
  22. I had a look around the website, and the only point of difference compared to other hover overs would be the fact its using an iframe. I did some research and I came across this StackOverflow question which looks accurate. https://stackoverflow.com/questions/43787495/iframehover-in-ie-and-edge-doesnt-work-as-expected What is the purpose of putting an iframe in? If its to include a given file in the HTML, may I recommend a server-side processing language such as PHP. I'd be pleased to assist you in setting this up. I love your website by the way!
  23. This page has a list of data-types valid to advantage SQL http://devzone.advantagedatabase.com/dz/webhelp/advantage9.0/supported_statements/miscellaneous_functions.htm Probably looking for SQL_DATE
  24. Looking through the website again, I've noticed that the issue is no longer occurring for me. Perhaps you've fixed it? Inadvertently?
  25. As I've been playing around in your site, I've noticed that your 'missing divs' appear right as you're attempting to leave the particular section. I also noticed that when I attempted to come back to the section, it hid itself again. However, when I attempted to navigate to the 'same' section as the one I was in, all the 'missing divs' were there. The main one I've noticed is your services page, which when you navigate onto it, the x-card-inner div is set to a height of 16px, when you navigate off, it goes to 295px. Something is off in the JavaScript. Could you look into the theme page transitions? I suspect it might be something there.
×
×
  • Create New...